Book description
Add custom features to browsers old and new by writing polyfill libraries, JavaScript plugins that take browsers beyond their native capabilities. In this practical fieldbook, author Brandon Satrom introduces principles and guidelines for polyfill development, and then walks you through the steps for building a complex, real-world HTML5 polyfill.
You’ll also explore the future of polyfilling—or prollyfilling—that will enable you to test and work with emerging concepts, often ahead of browser vendors. By the time you finish this book, you’ll have the tools and hands-on experience you need to build reliable polyfills for today’s and tomorrow’s Web.
- Learn the current state of polyfills, including shims, opt-ins, and drop-ins
- Use principles and practices to build responsible polyfills that benefit the entire web development community
- Build out several features for an HTML5 Forms polyfill library
- Configure a build environment and run automated cross-browser testing
- Optimize performance, handle edge cases, and fine-tune the speed of your polyfill
- Get examples of prollyfilling libraries that push the boundaries of the Web
- Write a sample prollyfill and compare it to current polyfill builds
Publisher resources
Table of contents
- Building Polyfills
- Preface
- Foreword
-
I. Building Polyfills
- 1. The Current State of Web Polyfills
- 2. Principles and Practices of Polyfill Development
- 3. Building Your First Polyfill, Part 1: Getting Started
- 4. Building Your First Polyfill, Part 2: Build Workflows and Cross-Browser Testing
- 5. Building Your First Polyfill, Part 3: Performance and Edge-Case Testing
-
II. Prollyfilling and the Future of the Web Platform
- 6. The Future of Polyfilling
-
7. Building Your First Prollyfill
- Prollyfills vs. Polyfills: What’s the Difference?
- The Resource Priorities Prollyfill
- Specifying the API and Deciding What to Build
- Setting Up Your Prollyfill Project
-
Adding Prollyfill Features
- The First Test: Feature Detection
- The Second Test: Initial lazyload Functionality
- The First Refactor: Cleaning Up the Tests
- The Third Test: Modifying the Public API
- The Fourth Test: Supporting Additional Element Types
- The Second Refactor: Completing Element Type Support
- The Fifth Test: Completing Initial Support
- The Final Test: Supporting the lazyloaded Event
- What’s Next?
- About the Author
- Colophon
- Copyright
Product information
- Title: Building Polyfills
- Author(s):
- Release date: February 2014
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449370695
You might also like
book
ハイパフォーマンス ブラウザネットワーキング ―ネットワークアプリケーションのためのパフォーマンス最適化
現代のアプリケーションエンジニアは、UIやデータ処理、開発言語、プラットフォームの仕様や癖だけでなく、サーバやネットワークについても、上から下まで、表から裏まで広く知ることを求められます。本書は「ブラウザ」に関連し、インターネットで使用されるさまざまなネットワーク技術をまとめたものです。HTTP/2.0やWebRTCなどの最新技術、WebSocketやXMLHttpRequestなどのブラウザAPI、そしてそれらの土台となるTCPやUDPやトランスポート層についてまでを幅広くカバーします。また改善前後の性能・速さを可能な限り具体化し、それぞれの場面においてのパフォーマンス改善幅を示します。
book
SVGエッセンシャルズ 第2版
SVGは2001年にW3C勧告として公開されたXMLベースの画像フォーマットです。ベクターグラフィックスなので拡大縮小、変形しても美しさが損なわれません。本書では簡潔なサンプルを数多く使い、基本的な図形の作成、アニメーションや複雑なグラフィックスの作成、さらにはスクリプトによる制御など、SVGの基礎から応用までをわかりやすく解説します。スマートフォンのSVG対応も進み、今後はさらに利用が膨らむであろうこのレガシーで今とても熱いフォーマットの基本を本書でマスターしましょう。
book
Jump Start Web Performance
Despite working on the web every day, few developers have a good word to say about …
book
DOM Enlightenment
With DOM Enlightenment, you’ll learn how to manipulate HTML more efficiently by scripting the Document Object …