Index: sdk/lib/html/dart2js/html_dart2js.dart |
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart |
index 3a6983a5e16125f313b60a6aa4cf2c59b84a6c18..53cd668f4d6653dcbfa40678799cfcbeb4fd9fd2 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -626,10 +626,16 @@ class BeforeLoadEvent extends Event native "BeforeLoadEvent" { |
@DocsEditable() |
@DomName('BeforeUnloadEvent') |
-@Experimental() // untriaged |
class BeforeUnloadEvent extends Event native "BeforeUnloadEvent" { |
// To suppress missing implicit constructor warnings. |
factory BeforeUnloadEvent._() { throw new UnsupportedError("Not supported"); } |
+ |
+ // Shadowing definition. |
+ String get returnValue => JS("String", "#.returnValue", this); |
+ |
+ void set returnValue(String value) { |
+ JS("void", "#.returnValue = #", this, value); |
+ } |
} |
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
@@ -25362,8 +25368,9 @@ class _BeforeUnloadEventStreamProvider implements |
const _BeforeUnloadEventStreamProvider(this._eventType); |
Stream<BeforeUnloadEvent> forTarget(EventTarget e, {bool useCapture: false}) { |
- var controller = new StreamController(sync: true); |
var stream = new _EventStream(e, _eventType, useCapture); |
+ var controller = new StreamController(sync: true); |
+ |
stream.listen((event) { |
var wrapped = new _BeforeUnloadEvent(event); |
controller.add(wrapped); |