| 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);
|
|
|