polymer-dart icon indicating copy to clipboard operation
polymer-dart copied to clipboard

Javascript handlers are always in the root zone

Open johnpryan opened this issue 8 years ago • 2 comments

Description

Steps to Reproduce

Initialize polymer in a zone:

main() {
  runZoned(() async {
    await initPolymer();
  });
}

Expected Results

a Polymer component handle (e.g. on-tap="tapHandler") should run in the same zone that called await initPolymer(): printing Zone.current should be a CustomZone, not the root zone.

Actual Results

The root zone

johnpryan avatar Sep 21 '16 18:09 johnpryan

This seems related to https://github.com/dart-lang/sdk/issues/17301

johnpryan avatar Sep 21 '16 18:09 johnpryan

It's also worth noting that the initPolymer() API used to return the zone in 0.16.0

johnpryan avatar Sep 26 '16 22:09 johnpryan