Skip to content

Commit 1f751bd

Browse files
Patch mutation observer (#618)
1 parent 3f66035 commit 1f751bd

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/_hyperscript.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4268,7 +4268,10 @@
42684268
} while (tokens.matchToken("and"));
42694269
}
42704270
} else if (eventName === "mutation") {
4271-
mutationSpec = {};
4271+
mutationSpec = {
4272+
attributeOldValue: true,
4273+
characterDataOldValue: true,
4274+
};
42724275
if (tokens.matchToken("of")) {
42734276
do {
42744277
if (tokens.matchToken("anything")) {
@@ -4280,12 +4283,10 @@
42804283
mutationSpec["childList"] = true;
42814284
} else if (tokens.matchToken("attributes")) {
42824285
mutationSpec["attributes"] = true;
4283-
mutationSpec["attributeOldValue"] = true;
42844286
} else if (tokens.matchToken("subtree")) {
42854287
mutationSpec["subtree"] = true;
42864288
} else if (tokens.matchToken("characterData")) {
42874289
mutationSpec["characterData"] = true;
4288-
mutationSpec["characterDataOldValue"] = true;
42894290
} else if (tokens.currentToken().type === "ATTRIBUTE_REF") {
42904291
var attribute = tokens.consumeToken();
42914292
if (mutationSpec["attributeFilter"] == null) {

0 commit comments

Comments
 (0)