Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Commit c468c26

Browse files
committed
window ref
1 parent f1b4d16 commit c468c26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

loadJS.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*! loadJS: load a JS file asynchronously. [c]2014 @scottjehl, Filament Group, Inc. (Based on http://goo.gl/REQGQ by Paul Irish). Licensed MIT */
22
function loadJS( src ){
33
"use strict";
4-
var ref = document.getElementsByTagName( "script" )[ 0 ];
4+
var ref = window.document.getElementsByTagName( "script" )[ 0 ];
55
var script = window.document.createElement( "script" );
66
script.src = src;
77
ref.parentNode.insertBefore( script, ref );

0 commit comments

Comments
 (0)