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

Unified Diff: client/html/src/Event.dart

Issue 8404013: Add constructors to all the event classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regenerate release/html. Created 9 years, 2 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:
View side-by-side diff with in-line comments
Download patch
Index: client/html/src/Event.dart
diff --git a/client/html/generated/src/interface/Event.dart b/client/html/src/Event.dart
similarity index 75%
rename from client/html/generated/src/interface/Event.dart
rename to client/html/src/Event.dart
index cd7c20579d620348b637b5407b54ef9672249ab1..147d4059530e209e6c62c4476fc35a04b4200028 100644
--- a/client/html/generated/src/interface/Event.dart
+++ b/client/html/src/Event.dart
@@ -2,9 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
-
-interface Event {
+interface Event factory EventWrappingImplementation {
static final int AT_TARGET = 2;
@@ -44,6 +42,14 @@ interface Event {
static final int SELECT = 16384;
+ // In JS, canBubble and cancelable are technically required parameters to
+ // init*Event. In practice, though, if they aren't provided they simply
+ // default to false (since that's Boolean(undefined)).
+ //
+ // Contrary to JS, we default canBubble and cancelable to true, since that's
+ // what people want most of the time anyway.
+ Event(String type, [bool canBubble, bool cancelable]);
+
bool get bubbles();
bool get cancelBubble();
@@ -70,8 +76,6 @@ interface Event {
String get type();
- void initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg);
-
void preventDefault();
void stopImmediatePropagation();
« no previous file with comments | « client/html/src/ErrorEventWrappingImplementation.dart ('k') | client/html/src/EventWrappingImplementation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698