Skip to content

Releases: canjs/can-zone

1.0.1

Choose a tag to compare

@m-mujica m-mujica released this 14 Oct 20:43

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

Choose a tag to compare

@matthewp matthewp released this 10 Oct 12:51

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

Choose a tag to compare

@chasenlehara chasenlehara released this 29 Jun 14:54

Fix webpack require warning #179

v0.6.21

Choose a tag to compare

@chasenlehara chasenlehara released this 29 Jun 14:54

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

0.6.20

Choose a tag to compare

@matthewp matthewp released this 23 Apr 20:04

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

0.6.19

Choose a tag to compare

@matthewp matthewp released this 14 Apr 18:48

not trying to read EVENT_HANDLER of undefined

Choose a tag to compare

@phillipskevin phillipskevin released this 06 Feb 23:40

0.6.17

Choose a tag to compare

@m-mujica m-mujica released this 04 Jan 21:42

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

Choose a tag to compare

@matthewp matthewp released this 20 Nov 21:31

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

Choose a tag to compare

@matthewp matthewp released this 17 Nov 20:48

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