File tree 1 file changed +16
-8
lines changed
packages/core-js/internals
1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -33,14 +33,22 @@ var NullProtoObjectViaIFrame = function () {
33
33
var iframe = documentCreateElement ( 'iframe' ) ;
34
34
var JS = 'java' + SCRIPT + ':' ;
35
35
var iframeDocument ;
36
- iframe . style . display = 'none' ;
37
- html . appendChild ( iframe ) ;
38
- // https://github.com/zloirock/core-js/issues/475
39
- iframe . src = String ( JS ) ;
40
- iframeDocument = iframe . contentWindow . document ;
41
- iframeDocument . open ( ) ;
42
- iframeDocument . write ( scriptTag ( 'document.F=Object' ) ) ;
43
- iframeDocument . close ( ) ;
36
+ if ( iframe . style ) {
37
+ iframe . style . display = 'none' ;
38
+ html . appendChild ( iframe ) ;
39
+ // https://github.com/zloirock/core-js/issues/475
40
+ iframe . src = String ( JS ) ;
41
+ iframeDocument = iframe . contentWindow . document ;
42
+ iframeDocument . open ( ) ;
43
+ iframeDocument . write ( scriptTag ( 'document.F=Object' ) ) ;
44
+ iframeDocument . close ( ) ;
45
+ } else {
46
+ /* global ActiveXObject -- in WSH */
47
+ activeXDocument = new ActiveXObject ( 'htmlfile' ) ; // without document.domain
48
+ iframeDocument = {
49
+ F : NullProtoObjectViaActiveX ( activeXDocument )
50
+ } ;
51
+ }
44
52
return iframeDocument . F ;
45
53
} ;
46
54
You can’t perform that action at this time.
0 commit comments