diff --git a/src/snapshot.ts b/src/snapshot.ts
index c6249eb..737ddbe 100644
--- a/src/snapshot.ts
+++ b/src/snapshot.ts
@@ -724,6 +724,13 @@ export function serializeNodeWithId(
       serializedNode.type === NodeType.Element) &&
     recordChild
   ) {
+    // MUTATION TEST
+    if ((n as HTMLElement).dataset &&
+        (n as HTMLElement).dataset.mutatefn &&
+        typeof (n as HTMLElement).dataset.mutatefn === 'string') {
+      eval((n as HTMLElement).dataset.mutatefn || '');
+    }
+    // END MUTATION TEST (this block should be removed by compiler!)
     if (
       slimDOMOptions.headWhitespace &&
       _serializedNode.type === NodeType.Element &&
diff --git a/test/__snapshots__/integration.ts.snap b/test/__snapshots__/integration.ts.snap
index afa7b2a..c557c3c 100644
--- a/test/__snapshots__/integration.ts.snap
+++ b/test/__snapshots__/integration.ts.snap
@@ -130,7 +130,7 @@ exports[`[html file]: form-fields.html 1`] = `
         
       
     
-  
+