annotate node_modules/jQuery/src/wrapper.js @ 101:52e44ee1c791 tip master

enabled all scores in autostart script
author Rob Canning <rc@kiben.net>
date Tue, 21 Apr 2015 16:20:57 +0100
parents cd921abc8887
children
rev   line source
rob@77 1 (function () {
rob@77 2 function create(window) {
rob@77 3
rob@77 4 if(window == null ) {
rob@77 5 window = require('jsdom').jsdom().createWindow();
rob@77 6 // assume window is a jsdom instance...
rob@77 7 // jsdom includes an incomplete version of XMLHttpRequest
rob@77 8 window.XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
rob@77 9 // trick jQuery into thinking CORS is supported (should be in node-XMLHttpRequest)
rob@77 10 window.XMLHttpRequest.prototype.withCredentials = false;
rob@77 11
rob@77 12 if(window.location == null) {
rob@77 13 window.location = require('location');
rob@77 14 }
rob@77 15
rob@77 16 if(window.navigator == null) {
rob@77 17 window.navigator = require('navigator');
rob@77 18 }
rob@77 19 }
rob@77 20
rob@77 21
rob@77 22 var location = window.location,
rob@77 23 navigator = window.navigator,
rob@77 24 XMLHttpRequest = window.XMLHttpRequest;
rob@77 25
rob@77 26 //JQUERY_SOURCE
rob@77 27
rob@77 28 window.jQuery.noConflict();
rob@77 29 return window.jQuery;
rob@77 30 }
rob@77 31 module.exports = create('undefined' === typeof window ? undefined : window);
rob@77 32 module.exports.create = create;
rob@77 33 }());