Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 54913005: Fixing the BeforeUnloadEvent (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 62b96f20078d70783931d555f0243167caf08d85..6152c4bb6dbf2a445dd9e2a5c79656714991a140 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
@@ -25341,8 +25347,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);
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698