0.6.11
This release adds support for the afterRun
hook and allows for providing plugins as an array to the Zone constructor.
afterRun
This is a new hook that runs immediately after the run
function is called. This is useful if you need to do some sort of cleanup immediately after the run function is called, especially in cases where the Zone user is going to wait on the runPromise to complete.
var htmlZone = {
afterRun: function(){
this.data.state = document.documentElement.outerHTML;
}
};
var zone = new Zone(htmlZone);
zone.run(render);
zone.data.html; // Can use this now
Array argument in Zone constructor
A common way to use the Zone constructor is to pass only a list of plugins. This was a little clunky before:
var zone = new Zone({
plugins: [
pluginOne(),
pluginTwo()
]
});
In 0.6.11 this is now simplified to:
var zone = new Zone([
pluginOne(),
pluginTwo()
]);