Skip to content

Instantly share code, notes, and snippets.

@bcoe
Created September 12, 2011 20:07
Show Gist options
  • Save bcoe/1212243 to your computer and use it in GitHub Desktop.
Save bcoe/1212243 to your computer and use it in GitHub Desktop.
example-jsdom.js
exports.jQueryify = exports.jsdom.jQueryify = function (window /* path [optional], callback */) {
var args = Array.prototype.slice.call(arguments),
callback = (typeof(args[args.length - 1]) === 'function') && args.pop(),
path,
jQueryTag = window.document.createElement("script");
if (args.length > 1 && typeof(args[1] === 'string')) {
path = args[1];
}
// ... Function body.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment