wraps chrome extension apis so that if they are executing in a zone, their callbacks do too
If, for instance, you wish to use angular2 in a chrome extension, and want to change renderable/injectable/etc values from within a chrome extension api callback.
npm install chrome-zones
is the easiest.
If npm is too heavy for you, grab a built version from this repo. Note that you'll also need angular/zone.js included in your page.
An example of an angular2 powered chrome extension can be found @ bengreenier/angular2-chrome-zones-quickstart
See example for a complete working example.
Using monkeypatching and zone.wrap
. Basically when the script loads
it patches the entire chrome.<whatever>
api space such that all
functions that are called have their last argument (if it is a function)
patched with zone.wrap
.
MIT