File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,13 @@ var DefaultChainable = getNewChainableClass('Chainable');
50
50
function getGlobal ( ) {
51
51
// Get global context by keyword here to avoid issues with libraries
52
52
// that can potentially alter this script's context object.
53
- return testGlobal ( typeof global !== 'undefined' && global ) ||
54
- testGlobal ( typeof window !== 'undefined' && window ) ;
53
+ var ret = testGlobal ( typeof global !== 'undefined' && global ) ||
54
+ testGlobal ( typeof window !== 'undefined' && window ) ;
55
+ if ( ret ) return ret ;
56
+ // Firefox / Thunderbird specific
57
+ if ( typeof Cu != 'undefined' && typeof Cu . getGlobalForObject != 'undefined' )
58
+ ret = testGlobal ( Cu . getGlobalForObject ( getGlobal ) ) ;
59
+ return ret ;
55
60
}
56
61
57
62
function testGlobal ( obj ) {
You can’t perform that action at this time.
0 commit comments