2 * jQuery JavaScript Library v@VERSION
5 * Copyright OpenJS Foundation and other contributors
6 * Released under the MIT license
7 * https://jquery.org/license
11 // Expose a factory as `jQueryFactory`. Aimed at environments without
12 // a real `window` where an emulated window needs to be constructed. Example:
14 // import { jQueryFactory } from "jquery/factory";
15 // const jQuery = jQueryFactory( window );
17 // See ticket trac-14549 for more info.
18 function jQueryFactoryWrapper( window, noGlobal ) {
20 if ( !window.document ) {
21 throw new Error( "jQuery requires a window with a document" );
25 // build.js inserts compiled jQuery here
31 export function jQueryFactory( window ) {
32 return jQueryFactoryWrapper( window, true );