You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
547 B
17 lines
547 B
define(function(){ |
|
if (typeof global !== 'undefined' && typeof global !== 'function') { |
|
// global spec defines a reference to the global object called 'global' |
|
// https://github.com/tc39/proposal-global |
|
// `global` is also defined in NodeJS |
|
return global; |
|
} |
|
else if (typeof window !== 'undefined') { |
|
// window is defined in browsers |
|
return window; |
|
} |
|
else if (typeof self !== 'undefined') { |
|
// self is defined in WebWorkers |
|
return self; |
|
} |
|
return this; |
|
});
|
|
|