Build: migrate grunt authors to a custom script
[jquery.git] / src / wrapper-factory.js
blob212ff33bf60e5ca0d9f7432490d2e774e094a8e0
1 /*!
2 * jQuery JavaScript Library v@VERSION
3 * https://jquery.com/
5 * Copyright OpenJS Foundation and other contributors
6 * Released under the MIT license
7 * https://jquery.org/license
9 * Date: @DATE
11 // Expose a factory as `jQueryFactory`. Aimed at environments without
12 // a real `window` where an emulated window needs to be constructed. Example:
14 // const jQuery = require( "jquery/factory" )( window );
16 // See ticket trac-14549 for more info.
17 function jQueryFactoryWrapper( window, noGlobal ) {
19 "use strict";
21 if ( !window.document ) {
22 throw new Error( "jQuery requires a window with a document" );
25 // @CODE
26 // build.js inserts compiled jQuery here
28 return jQuery;
32 function jQueryFactory( window ) {
33 "use strict";
35 return jQueryFactoryWrapper( window, true );
38 module.exports = { jQueryFactory: jQueryFactory };