Building Polyfills: Web Platform APIs for the Present and by Brandon Satrom

By Brandon Satrom

Upload customized positive factors to browsers outdated and new via writing polyfill libraries, JavaScript plugins that take browsers past their local services. during this functional fieldbook, writer Brandon Satrom introduces ideas and directions for polyfill improvement, after which walks you thru the stairs for construction a posh, real-world HTML5 polyfill. you will additionally discover the way forward for polyfilling - or prollyfilling - that would assist you attempt and paintings with rising innovations, frequently prior to browser proprietors. by the point you end this publication, you should have the instruments and hands-on event you must construct trustworthy polyfills for modern day and tomorrow's net.

Show description

Read or Download Building Polyfills: Web Platform APIs for the Present and Future PDF

Best javascript books

Building Single-page Web Apps with Meteor

Approximately This Book

Create a whole net web publication from frontend to backend that makes use of basically JavaScript
Understand how net 2. zero is made by means of robust browser-based applications
Step-by-step educational that would express you ways speedy, advanced net functions will be built
Who This ebook Is For

If you're a net developer with simple wisdom of JavaScript and need to tackle net 2. zero, construct real-time purposes, or just are looking to write a whole program utilizing basically JavaScript and HTML/CSS, this is often the booklet for you.

This booklet relies on Meteor 1. zero.

JavaScript (5th Edition) (The Web Technologies Series)

Now in its 5th variation, JAVASCRIPT publications starting programmers via internet program improvement utilizing the JavaScript programming language. As with earlier variations of this e-book, Don Gosselin introduces key net authoring recommendations with a powerful specialize in software. A real-world venture, just like what scholars could come upon in a certified atmosphere, is built all through each one bankruptcy.

JavaScript & jQuery: The Missing Manual, 2nd Edition

JavaScript permits you to supercharge your HTML with animation, interactivity, and visible effects-but many internet designers locate the language challenging to benefit. This jargon-free consultant covers JavaScript fundamentals and exhibits you the way to save lots of effort and time with the jQuery library of prewritten JavaScript code. you will soon be construction web content that suppose and act like machine courses, with no need to do a lot programming.

Javascript Unlocked

Enhance your code maintainability, functionality, and protection via sensible specialist insights and release the whole power of JavaScriptAbout This BookImprove your JavaScript code for greater maintainability and performanceDiscover tips on how to enforce scalable software structure with JavaScriptLearn to exploit JavaScript in the back of the browser, together with its command-line instruments, computing device apps, and local cellular appsWho This booklet Is ForJavaScript Unlocked is for these JS builders who are looking to see simply how a ways they could push their favorite language via functional perception and methods.

Extra info for Building Polyfills: Web Platform APIs for the Present and Future

Sample text

First, I’ll create the core source file for my polyfill in the src/ folder for my project. js, which follows a naming convention similar to other Kendo UI source files. Then, in my new source file, I’ll include the code in Example 3-3. Example 3-3. Form). kendoForm. plugin(Form); } (jQuery, kendo)); As illustrated here, my polyfill starts with an Immediately-Invoked Function Expres‐ sion (IIFE) that specifies my dependencies (jQuery and Kendo UI in this case). Next, I create some local lookup variables to cache key parts of the Kendo UI namespace.

Now, when I view the sample form in Safari, Firefox, or Internet Explorer (all browsers that do not support the color type at the time of writing), I’ll see a Kendo UI ColorPicker in place of the default text input, as seen in Figure 3-4. Figure 3-4. info To Feature Detect or Not to Feature Detect Of course, there’s a catch. As it happens, if you view the sample page in a browser that does support the color type (like Chrome or Opera), you’ll notice that a ColorPicker was created in these browsers as well.

For the examples in this book, I’ve chosen Git as my source control solution and GitHub for code sharing and distribution. Setting Up the Initial Project Structure Once I’ve chosen a source control solution, I’m ready to set up my project. I’ll start by creating a new folder for my polyfill, called kendo-ui-forms in my usual development folder on my machine. Then, I’ll open a terminal window in that directory and initialize a new GitHub repo by running the git init command. git. If you’re not familiar with setting up a new remote repository, head over to GitHub, create a new repository for your project, and follow the on-screen instructions.

Download PDF sample

Rated 4.76 of 5 – based on 37 votes

About the Author

admin