Skip to content

Instantly share code, notes, and snippets.

View webakimbo's full-sized avatar

Andrew dePasquale webakimbo

  • Code Refactory
  • San Francisco, CA
View GitHub Profile
// polyfill for Event constructor
// source: https://stackoverflow.com/a/26596324
(function () {
if ( typeof window.CustomEvent === "function" ) return false; //If not IE
function CustomEvent ( event, params ) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent( 'CustomEvent' );
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
return evt;

Keybase proof

I hereby claim:

  • I am webakimbo on github.
  • I am webakimbo (https://keybase.io/webakimbo) on keybase.
  • I have a public key whose fingerprint is DD5F DF1C 757A 6FC9 363F ECA4 453A 06FB 5575 2F8D

To claim this, I am signing this object: