Releases: canjs/can-zone
1.0.1
0.6.23
v0.6.22
v0.6.21
0.6.20
0.6.19
not trying to read EVENT_HANDLER of undefined
0.6.17
Wrap event handlers set with .on[event] = handler
syntax.
This patch release makes it so can-zone
wraps event handlers like the following:
var div = document.createElement("div");
// handleClick should run within the current zone now.
div.onclick = function handleClick() {
};
0.6.16
This patch release moves debug-on-timeout in the can-zone/debug plugin to occur when the asynchronous function is called, rather than when the callback is called. This makes it easier to look back in the call stack and figure out why the asynchronous code is still running after a timeout is complete.
0.6.15
This is a minor release, adding the following features:
Subclassable Zone
The Zone
constructor can now be subclassed. This is useful in case you need to isolate Zone.current
when run in an environment where you can't capture async tasks by calling a function. An example would be if using iframes:
var Zone = require("can-zone");
var SubZone = class extends Zone {};
var zone = new SubZone();
SubZone.current = zone;
// Now you can do stuff with `zone` and it won't touch
`Zone.current`.
Break on timeout
You can now get a debugger;
statement when using can-zone/debug, allowing you to step into code that is preventing the zone's run promise from resolving.
var Zone = require("can-zone");
var zone = new Zone([
debug(5000, { break: true });
]);
New documentation
Some missing documentation was added for:
- afterTask: A hook that is called at the end of a Task.
- globals: A property on the ZoneSpec that allows you to specify globals that should be replaced inside of the zone.