From 2d99a49de1ff912ce72581c0390d4c26f5f02f44 Mon Sep 17 00:00:00 2001 From: Tim Branyen Date: Thu, 22 Apr 2021 20:41:43 -0700 Subject: [PATCH] For browsers/runtimes that do not support MutationObserver, always mark dirty --- packages/diffhtml/lib/transaction.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/diffhtml/lib/transaction.js b/packages/diffhtml/lib/transaction.js index 2433ce92..b55cba64 100644 --- a/packages/diffhtml/lib/transaction.js +++ b/packages/diffhtml/lib/transaction.js @@ -224,6 +224,11 @@ export default class Transaction { characterData: true, }); } + // If there is no MutationObserver, then the DOM is dirty by default and + // rescanned every time. + else { + state.isDirty = true; + } // Execute all queued scripts. scriptsToExecute.forEach((type = EMPTY.STR, vTree) => {