This repository was archived by the owner on Mar 13, 2018. It is now read-only.
File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 16
16
17
17
var OriginalWindow = window . Window ;
18
18
var originalGetComputedStyle = window . getComputedStyle ;
19
+ var originalGetDefaultComputedStyle = window . getDefaultComputedStyle ;
19
20
var originalGetSelection = window . getSelection ;
20
21
21
22
function Window ( impl ) {
27
28
return wrap ( this || window ) . getComputedStyle ( unwrapIfNeeded ( el ) , pseudo ) ;
28
29
} ;
29
30
31
+ // Mozilla proprietary extension.
32
+ if ( originalGetDefaultComputedStyle ) {
33
+ OriginalWindow . prototype . getDefaultComputedStyle = function ( el , pseudo ) {
34
+ return wrap ( this || window ) . getDefaultComputedStyle (
35
+ unwrapIfNeeded ( el ) , pseudo ) ;
36
+ } ;
37
+ }
38
+
30
39
OriginalWindow . prototype . getSelection = function ( ) {
31
40
return wrap ( this || window ) . getSelection ( ) ;
32
41
} ;
62
71
}
63
72
} ) ;
64
73
74
+ // Mozilla proprietary extension.
75
+ if ( originalGetDefaultComputedStyle ) {
76
+ Window . prototype . getDefaultComputedStyle = function ( el , pseudo ) {
77
+ renderAllPending ( ) ;
78
+ return originalGetDefaultComputedStyle . call ( unwrap ( this ) ,
79
+ unwrapIfNeeded ( el ) , pseudo ) ;
80
+ } ;
81
+ }
82
+
65
83
registerWrapper ( OriginalWindow , Window , window ) ;
66
84
67
85
scope . wrappers . Window = Window ;
You can’t perform that action at this time.
0 commit comments