global
Get the global object for the current context.
GLOBAL([newGlobal])
Optionally sets, and returns the global that this environment provides. It will be one of:
var GLOBAL = require('can-globals/global/global');
var g = GLOBAL();
// In a browser
console.log(g === window); // -> true
Parameters
- newGlobal
{Object}
:An optional global-like object to set as the context's global
Returns
{Object}
:
The global object for this JavaScript environment.