Mercurial > hg > nodescore
view node_modules/jQuery/src/wrapper.js @ 77:cd921abc8887
added puredata trigger/OSC router
author | Rob Canning <rob@foo.net> |
---|---|
date | Tue, 15 Jul 2014 17:48:07 +0100 |
parents | |
children |
line wrap: on
line source
(function () { function create(window) { if(window == null ) { window = require('jsdom').jsdom().createWindow(); // assume window is a jsdom instance... // jsdom includes an incomplete version of XMLHttpRequest window.XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; // trick jQuery into thinking CORS is supported (should be in node-XMLHttpRequest) window.XMLHttpRequest.prototype.withCredentials = false; if(window.location == null) { window.location = require('location'); } if(window.navigator == null) { window.navigator = require('navigator'); } } var location = window.location, navigator = window.navigator, XMLHttpRequest = window.XMLHttpRequest; //JQUERY_SOURCE window.jQuery.noConflict(); return window.jQuery; } module.exports = create('undefined' === typeof window ? undefined : window); module.exports.create = create; }());