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

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

Issue 8404013: Add constructors to all the event classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/EventWrappingImplementation.dart
diff --git a/client/html/generated/src/wrapping/_EventWrappingImplementation.dart b/client/html/src/EventWrappingImplementation.dart
similarity index 85%
rename from client/html/generated/src/wrapping/_EventWrappingImplementation.dart
rename to client/html/src/EventWrappingImplementation.dart
index 0e6d27f25101a831b4a916be5f91195557990d8a..cb71171064339480222511187e7534e13babaf13 100644
--- a/client/html/generated/src/wrapping/_EventWrappingImplementation.dart
+++ b/client/html/src/EventWrappingImplementation.dart
@@ -2,11 +2,16 @@
// 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.
-
class EventWrappingImplementation extends DOMWrapperBase implements Event {
EventWrappingImplementation._wrap(ptr) : super._wrap(ptr) {}
+ factory EventWrappingImplementation(String type, [bool canBubble = false,
+ bool cancelable = false]) {
+ var e = dom.document.createEvent("Event");
+ e.initEvent(type, canBubble, cancelable);
+ return LevelDom.wrapEvent(e);
+ }
+
bool get bubbles() { return _ptr.bubbles; }
bool get cancelBubble() { return _ptr.cancelBubble; }
@@ -33,11 +38,6 @@ class EventWrappingImplementation extends DOMWrapperBase implements Event {
String get type() { return _ptr.type; }
- void initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg) {
- _ptr.initEvent(eventTypeArg, canBubbleArg, cancelableArg);
- return;
- }
-
void preventDefault() {
_ptr.preventDefault();
return;

Powered by Google App Engine
This is Rietveld 408576698