Skip to content

Instantly share code, notes, and snippets.

Ben Fletcher bjfletcher

Block or report user

Report or block bjfletcher

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thebeebs
thebeebs / AsyncExample.js
Last active Jan 3, 2017
An example of using Async Await to create some text in a guaranteed order.
View AsyncExample.js
// Calling the function using promises.
addElement("first promise sexy syntax")
.then(x => addElement("second promise syntax"))
.then(x => addElement("third promise syntax"))
.then(x => addElement("fourth promise syntax"))
// Calling the function using Async/Await
async function myFunction(){
await addElement("first async");
await addElement("second async");
@jonathantneal
jonathantneal / README.md
Created Sep 19, 2012
Polyfill the EventListener interface in IE8
View README.md

EventListener Polyfill

Is IE8 your new IE6? Level the playing field with polyfills.

This script polyfills addEventListener, removeEventListener, and dispatchEvent. It is less than half a kilobyte minified and gzipped.

addEventListener

addEventListener registers a single event listener on a single target.

You can’t perform that action at this time.