File tree 1 file changed +4
-31
lines changed
1 file changed +4
-31
lines changed Original file line number Diff line number Diff line change @@ -46,37 +46,10 @@ var deferUnhandledRejectionCheck;
46
46
promises . length = 0 ;
47
47
}
48
48
49
- if ( typeof document === "object" && document . createElement ) {
50
- deferUnhandledRejectionCheck = ( function ( ) {
51
- var iframeSetTimeout ;
52
-
53
- function checkIframe ( ) {
54
- if ( document . body ) {
55
- var iframe = document . createElement ( "iframe" ) ;
56
- document . body . appendChild ( iframe ) ;
57
- if ( iframe . contentWindow &&
58
- iframe . contentWindow . setTimeout ) {
59
- iframeSetTimeout = iframe . contentWindow . setTimeout ;
60
- }
61
- document . body . removeChild ( iframe ) ;
62
- }
63
- }
64
- checkIframe ( ) ;
65
- return function ( promise ) {
66
- promises . push ( promise ) ;
67
- if ( iframeSetTimeout ) {
68
- iframeSetTimeout ( unhandledRejectionCheck , 1 ) ;
69
- } else {
70
- checkIframe ( ) ;
71
- }
72
- } ;
73
- } ) ( ) ;
74
- } else {
75
- deferUnhandledRejectionCheck = function ( promise ) {
76
- promises . push ( promise ) ;
77
- setTimeout ( unhandledRejectionCheck , 1 ) ;
78
- } ;
79
- }
49
+ deferUnhandledRejectionCheck = function ( promise ) {
50
+ promises . push ( promise ) ;
51
+ setTimeout ( unhandledRejectionCheck , 1 ) ;
52
+ } ;
80
53
81
54
es5 . defineProperty ( Promise , "_unhandledRejectionCheck" , {
82
55
value : unhandledRejectionCheck
You can’t perform that action at this time.
0 commit comments