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

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

Issue 1582443003: Switch to using HashChangeEvent constructor instead of initHashChangeEvent (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months 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 883ae88ff1caaa01e4fb046abc37f08ea4f1ee66..a9506eaa3798aea12d8fd05d2066d9ea2d03f829 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -17688,10 +17688,17 @@ class HashChangeEvent extends Event {
factory HashChangeEvent(String type,
{bool canBubble: true, bool cancelable: true, String oldUrl,
String newUrl}) {
- var event = document._createEvent("HashChangeEvent");
- event._initHashChangeEvent(type, canBubble, cancelable, oldUrl, newUrl);
- return event;
+
+ var options = {
+ 'canBubble' : canBubble,
+ 'cancelable' : cancelable,
+ 'oldURL': oldUrl,
+ 'newURL': newUrl,
+ };
+ return JS('HashChangeEvent', 'new HashChangeEvent(#, #)',
+ type, convertDartToNative_Dictionary(options));
}
+
// To suppress missing implicit constructor warnings.
factory HashChangeEvent._() { throw new UnsupportedError("Not supported"); }
« 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