Skip to content

Releases: canjs/can-zone

1.0.1

14 Oct 20:43
Compare
Choose a tag to compare

can-zone should not create circular error references

This patch release fixes an issue where can-zone creates error objects that cannot be serialized, like:

error = {
    message: ...
    errors: [ error ]
    ...
}

0.6.23

10 Oct 12:51
Compare
Choose a tag to compare

This is a patch release, fixing a bug where code that set xhr.onload or xhr.onreadystatechange after calling xhr.send() would result in that code not occurring within the Zone (and causing the Zone not to complete). Bug: #183

v0.6.22

29 Jun 14:54
Compare
Choose a tag to compare

Fix webpack require warning #179

v0.6.21

29 Jun 14:54
Compare
Choose a tag to compare

Prevents errors thrown outside of the run promise from being swallowed #176

0.6.20

23 Apr 20:04
Compare
Choose a tag to compare

This is a bug fix release, making it possible to run can-zone inside of a web worker.

0.6.19

not trying to read EVENT_HANDLER of undefined

06 Feb 23:40
Compare
Choose a tag to compare

0.6.17

04 Jan 21:42
Compare
Choose a tag to compare

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

20 Nov 21:31
Compare
Choose a tag to compare

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

17 Nov 20:48
Compare
Choose a tag to compare

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 });
]);

break on timeout

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.

Issues