Index: tools/dom/templates/html/impl/impl_Window.darttemplate |
diff --git a/tools/dom/templates/html/impl/impl_Window.darttemplate b/tools/dom/templates/html/impl/impl_Window.darttemplate |
index 9c8f8ce2ac675ad1387a3c6dc7ee7f5f9c0f8a98..cce9a481a58ec4407db0f058d0d85cc42bec0e17 100644 |
--- a/tools/dom/templates/html/impl/impl_Window.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_Window.darttemplate |
@@ -315,7 +315,7 @@ class _BeforeUnloadEventStreamProvider implements |
const _BeforeUnloadEventStreamProvider(this._eventType); |
Stream<BeforeUnloadEvent> forTarget(EventTarget e, {bool useCapture: false}) { |
- var controller = new StreamController(); |
+ var controller = new StreamController(sync: true); |
var stream = new _EventStream(e, _eventType, useCapture); |
stream.listen((event) { |
var wrapped = new _BeforeUnloadEvent(event); |