dart-archive / polymer-dart

Polymer support for Dart
https://pub.dartlang.org/packages/polymer
BSD 3-Clause "New" or "Revised" License
181 stars 33 forks source link

Javascript handlers are always in the root zone #712

Open johnpryan opened 7 years ago

johnpryan commented 7 years ago

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 commented 7 years ago

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

johnpryan commented 7 years ago

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