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

Unified Diff: tools/dom/templates/html/impl/impl_MutationObserver.darttemplate

Issue 12474007: Revert 20127 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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: tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate b/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
index 7a107efaa4066b0464b5d52042fa3c1a2cc17f02..abab691a6794014cebf06fa6da148a0200cc44aa 100644
--- a/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
+++ b/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
@@ -20,7 +20,8 @@ $endif
}
void observe(Node target,
- {bool childList,
+ {Map options,
+ bool childList,
bool attributes,
bool characterData,
bool subtree,
@@ -31,6 +32,19 @@ $endif
// Parse options into map of known type.
var parsedOptions = _createDict();
+ if (options != null) {
+ options.forEach((k, v) {
+ if (_boolKeys.containsKey(k)) {
+ _add(parsedOptions, k, true == v);
+ } else if (k == 'attributeFilter') {
+ _add(parsedOptions, k, _fixupList(v));
+ } else {
+ throw new ArgumentError(
+ "Illegal MutationObserver.observe option '$k'");
+ }
+ });
+ }
+
// Override options passed in the map with named optional arguments.
override(key, value) {
if (value != null) _add(parsedOptions, key, value);

Powered by Google App Engine
This is Rietveld 408576698