can-global
GLOBAL()
Returns the global that this environment provides. It will be one of:
- Browser:
window
- Web Worker:
self
- Node.js:
global
var GLOBAL = require("can-global");
var g = GLOBAL();
// In a browser
console.log(g === window); // -> true
Returns
{Object}
:
The global object for this JavaScript environment.