| 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 4208322b7bcb2002bc5dc0a84c191c8259693d23..3469eef1c0c86d14650a1dc3830710b1e4f4e0ba 100644
|
| --- a/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
|
| @@ -18,6 +18,30 @@ $else
|
| '!!(window.MutationObserver || window.WebKitMutationObserver)');
|
| $endif
|
| }
|
| +$if DARTIUM
|
| + @DocsEditable()
|
| +$if JSINTEROP
|
| + static MutationObserver _create(callback) => wrap_jso(_blink.BlinkMutationObserver.instance.constructorCallback_1_((List<MutationRecord> mutations, MutationObserver observer) {
|
| + var wrapped_mutations = [];
|
| + for (var mutation in mutations) {
|
| + // Wrap the Javascript object for each MutationRecord.
|
| + wrapped_mutations.add(wrap_jso(mutation));
|
| + }
|
| + // Wrap the MutationObserver too.
|
| + callback(wrapped_mutations, wrap_jso(observer));
|
| + }));
|
| +$else
|
| + static MutationObserver _create(callback) => _blink.BlinkMutationObserver.instance.constructorCallback_1_((List<MutationRecord> mutations, MutationObserver observer) {
|
| + var wrapped_mutations = [];
|
| + for (var mutation in mutations) {
|
| + // Wrap the Javascript object for each MutationRecord.
|
| + wrapped_mutations.add(wrap_jso(mutation));
|
| + }
|
| + // Wrap the MutationObserver too.
|
| + callback(wrapped_mutations, wrap_jso(observer));
|
| + });
|
| +$endif
|
| +$endif
|
|
|
| /**
|
| * Observes the target for the specified changes.
|
|
|