canjs / can-zone

A context for tracking asynchronous activity in JavaScript applications.
https://v4.canjs.com/doc/can-zone.html
MIT License
92 stars 4 forks source link

Allow providing a global to a Zone #171

Closed matthewp closed 6 years ago

matthewp commented 6 years ago

Currently when you create a Zone everything overrides the environment's global. However, in some cases, there might be another global (such as jsdom, which creates a window), and you would rather it's globals be overridden.

It might be nice to be able to provide the global. Although in some ways this violates what Zones are about, so I'm unsure about it.

new Zone(options, global);
matthewp commented 6 years ago

Nah.