Skip to content

Instantly share code, notes, and snippets.

@rwaldron rwaldron/1414.js Secret
Created Jan 6, 2011

Embed
What would you like to do?
// Adapted from: http://stackoverflow.com/q/4465028/172322
//
var globalHandler = jQuery.expando + targetType;
window[ globalHandler ] = function( target ) {
method = document.createElement( target.nodeName )[ targetType ];
method.call( target );
};
window[ globalHandler ]( target );
delete window[ globalHandler ];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.