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

Unified Diff: client/html/src/MutationEventWrappingImplementation.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/MutationEventWrappingImplementation.dart
diff --git a/client/html/generated/src/wrapping/_MutationEventWrappingImplementation.dart b/client/html/src/MutationEventWrappingImplementation.dart
similarity index 60%
rename from client/html/generated/src/wrapping/_MutationEventWrappingImplementation.dart
rename to client/html/src/MutationEventWrappingImplementation.dart
index e2d79933202c6143f7fa242df31c7192020f7558..db920ef06d59333cb88b0c341a245f8eb6e9ac43 100644
--- a/client/html/generated/src/wrapping/_MutationEventWrappingImplementation.dart
+++ b/client/html/src/MutationEventWrappingImplementation.dart
@@ -2,11 +2,19 @@
// 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 MutationEventWrappingImplementation extends EventWrappingImplementation implements MutationEvent {
MutationEventWrappingImplementation._wrap(ptr) : super._wrap(ptr) {}
+ factory MutationEventWrappingImplementation(String type, Node relatedNode,
+ String prevValue, String newValue, String attrName, int attrChange,
+ [bool canBubble = false, bool cancelable = false]) {
+ var e = dom.document.createEvent("MutationEvent");
+ e.initMutationEvent(type, canBubble, cancelable,
+ LevelDom.unwrap(relatedNode), prevValue, newValue, attrName,
+ attrChange);
+ return LevelDom.wrapMutationEvent(e);
+ }
+
int get attrChange() { return _ptr.attrChange; }
String get attrName() { return _ptr.attrName; }
@@ -16,9 +24,4 @@ class MutationEventWrappingImplementation extends EventWrappingImplementation im
String get prevValue() { return _ptr.prevValue; }
Node get relatedNode() { return LevelDom.wrapNode(_ptr.relatedNode); }
-
- void initMutationEvent(String type, bool canBubble, bool cancelable, Node relatedNode, String prevValue, String newValue, String attrName, int attrChange) {
- _ptr.initMutationEvent(type, canBubble, cancelable, LevelDom.unwrap(relatedNode), prevValue, newValue, attrName, attrChange);
- return;
- }
}

Powered by Google App Engine
This is Rietveld 408576698