| 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 079ca0f1e3c5a6e9d71825de9ddf3f915f93f24c..d45e98a0e1c7b0e07fee7b6c73b57d9afb02febd 100644
|
| --- a/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
|
| @@ -21,8 +21,14 @@ $endif
|
| $if DARTIUM
|
| @DocsEditable()
|
| $if JSINTEROP
|
| - static MutationObserver _create(callback) => wrap_jso(_blink.BlinkMutationObserver.instance.constructorCallback_1_((mutations, observer) {
|
| - callback(mutations, wrap_jso(observer));
|
| + 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_(callback);
|
|
|