diff --git a/.sizes.json b/.sizes.json
index 73580359e..b84c9000a 100644
--- a/.sizes.json
+++ b/.sizes.json
@@ -7,23 +7,23 @@
{
"name": "*",
"total": {
- "min": 18159,
- "brotli": 6558
+ "min": 18438,
+ "brotli": 6702
}
},
{
"name": "counter",
"user": {
"min": 189,
- "brotli": 144
+ "brotli": 143
},
"runtime": {
- "min": 3802,
- "brotli": 1590
+ "min": 4081,
+ "brotli": 1737
},
"total": {
- "min": 3991,
- "brotli": 1734
+ "min": 4270,
+ "brotli": 1880
}
},
{
@@ -33,12 +33,12 @@
"brotli": 100
},
"runtime": {
- "min": 3140,
- "brotli": 1422
+ "min": 3419,
+ "brotli": 1556
},
"total": {
- "min": 3251,
- "brotli": 1522
+ "min": 3530,
+ "brotli": 1656
}
},
{
@@ -48,12 +48,12 @@
"brotli": 550
},
"runtime": {
- "min": 7806,
- "brotli": 3163
+ "min": 8085,
+ "brotli": 3304
},
"total": {
- "min": 8959,
- "brotli": 3713
+ "min": 9238,
+ "brotli": 3854
}
},
{
@@ -63,12 +63,12 @@
"brotli": 482
},
"runtime": {
- "min": 8818,
- "brotli": 3568
+ "min": 9097,
+ "brotli": 3718
},
"total": {
- "min": 9772,
- "brotli": 4050
+ "min": 10051,
+ "brotli": 4200
}
}
]
diff --git a/.sizes/counter.csr/entry.js b/.sizes/counter.csr/entry.js
index 746ac775a..381dbef22 100644
--- a/.sizes/counter.csr/entry.js
+++ b/.sizes/counter.csr/entry.js
@@ -1,4 +1,4 @@
-// size: 189 (min) 144 (brotli)
+// size: 189 (min) 143 (brotli)
const _clickCount_effect = effect("a0", (_scope, { 2: clickCount }) =>
on(_scope[0], "click", function () {
_clickCount(_scope, clickCount + 1);
diff --git a/.sizes/dom.js b/.sizes/dom.js
index 11c82772f..35f9d4554 100644
--- a/.sizes/dom.js
+++ b/.sizes/dom.js
@@ -1,4 +1,4 @@
-// size: 18159 (min) 6558 (brotli)
+// size: 18438 (min) 6702 (brotli)
var empty = [],
rest = Symbol();
function attrTag(attrs2) {
@@ -49,28 +49,28 @@ function triggerMacroTask() {
port2.postMessage(0);
}
function createScope($global) {
- return { u: 1, $global: $global };
+ return { y: 1, $global: $global };
}
var emptyScope = createScope({});
function getEmptyScope(marker) {
return (emptyScope.a = emptyScope.b = marker), emptyScope;
}
function destroyScope(scope) {
- _destroyScope(scope), scope.d?.h?.delete(scope);
- let closureSignals = scope.x?.c;
- if (closureSignals) for (let signal of closureSignals) signal.j?.(scope);
+ _destroyScope(scope), scope.e?.k?.delete(scope);
+ let closureSignals = scope.z?.c;
+ if (closureSignals) for (let signal of closureSignals) signal.l?.(scope);
return scope;
}
function _destroyScope(scope) {
- scope.h?.forEach(_destroyScope);
- let controllers = scope.l;
+ scope.k?.forEach(_destroyScope);
+ let controllers = scope.n;
if (controllers) for (let ctrl of controllers.values()) ctrl.abort();
}
function onDestroy(scope) {
- let parentScope = scope.d;
- for (; parentScope && !parentScope.h?.has(scope); )
- (parentScope.h ||= new Set()).add(scope),
- (parentScope = (scope = parentScope).d);
+ let parentScope = scope.e;
+ for (; parentScope && !parentScope.k?.has(scope); )
+ (parentScope.k ||= new Set()).add(scope),
+ (parentScope = (scope = parentScope).e);
}
function removeAndDestroyScope(scope) {
destroyScope(scope);
@@ -91,30 +91,30 @@ function insertBefore(scope, parent, nextSibling) {
}
var registeredValues = {},
Render = class {
- m = [];
- n = {};
- y = { _: registeredValues };
+ o = [];
+ p = {};
+ A = { _: registeredValues };
constructor(renders, runtimeId, renderId) {
- (this.z = renders),
- (this.A = runtimeId),
- (this.o = renderId),
- (this.p = renders[renderId]),
- this.q();
+ (this.B = renders),
+ (this.C = runtimeId),
+ (this.q = renderId),
+ (this.s = renders[renderId]),
+ this.t();
}
w() {
- this.p.w(), this.q();
+ this.s.w(), this.t();
}
- q() {
- let data2 = this.p,
- serializeContext = this.y,
- scopeLookup = this.n,
+ t() {
+ let data2 = this.s,
+ serializeContext = this.A,
+ scopeLookup = this.p,
visits = data2.v,
cleanupOwners = new Map();
if (visits.length) {
let commentPrefixLen = data2.i.length,
cleanupMarkers = new Map();
data2.v = [];
- let sectionEnd = (visit, scopeId = this.f, curNode = visit) => {
+ let sectionEnd = (visit, scopeId = this.h, curNode = visit) => {
let scope = (scopeLookup[scopeId] ||= {}),
endNode = curNode;
for (; 8 === (endNode = endNode.previousSibling).nodeType; );
@@ -141,17 +141,17 @@ var registeredValues = {},
if ("*" === token) scope[data3] = visit.previousSibling;
else if ("$" === token) cleanupMarkers.set(scopeId, visit);
else if ("[" === token)
- this.f && (data3 && sectionEnd(visit), this.m.push(this.f)),
- (this.f = scopeId),
+ this.h && (data3 && sectionEnd(visit), this.o.push(this.h)),
+ (this.h = scopeId),
(scope.a = visit);
else if ("]" === token) {
- if (((scope[data3] = visit), scopeId < this.f)) {
+ if (((scope[data3] = visit), scopeId < this.h)) {
let currParent = visit.parentNode,
startNode = sectionEnd(visit).a;
currParent &&
currParent !== startNode.parentNode &&
currParent.prepend(startNode),
- (this.f = this.m.pop());
+ (this.h = this.o.pop());
}
} else if ("|" === token) {
scope[parseInt(data3)] = visit;
@@ -177,8 +177,8 @@ var registeredValues = {},
{ $global: $global } = scopeLookup;
$global ||
((scopeLookup.$global = $global = scopes.$ || {}),
- ($global.runtimeId = this.A),
- ($global.renderId = this.o));
+ ($global.runtimeId = this.C),
+ ($global.renderId = this.q));
for (let scopeId in scopes)
if ("$" !== scopeId) {
let scope = scopes[scopeId],
@@ -188,11 +188,11 @@ var registeredValues = {},
(scopeLookup[scopeId] = Object.assign(scope, prevScope));
let cleanupOwnerId = cleanupOwners.get(scopeId);
cleanupOwnerId &&
- ((scope.d = scopes[cleanupOwnerId]), onDestroy(scope));
+ ((scope.e = scopes[cleanupOwnerId]), onDestroy(scope));
}
} else
i === len || "string" != typeof resumes[i]
- ? delete this.z[this.o]
+ ? delete this.B[this.q]
: registeredValues[resumes[i++]](
scopeLookup[resumeData],
scopeLookup[resumeData],
@@ -235,7 +235,7 @@ function init(runtimeId = "M") {
});
}
function registerSubscriber(id, signal) {
- return register(id, signal.g), signal;
+ return register(id, signal.j), signal;
}
function nodeRef(id, key) {
return register(id, (scope) => () => scope[key]);
@@ -266,8 +266,24 @@ function state(valueAccessor, fn, getIntersection) {
((isScheduled = !0), queueMicrotask(flushAndWaitFrame)),
(rendering = !0),
signal(scope, MARK),
- (rendering = !1),
- pendingSignals.push(scope, signal, value2);
+ (rendering = !1);
+ let nextSignal = { f: scope, D: signal, E: value2, d: void 0 };
+ if (pendingSignal)
+ if (sortScopeByDOMPosition(pendingSignal.f, nextSignal.f) < 0)
+ (nextSignal.d = pendingSignal), (pendingSignal = nextSignal);
+ else {
+ let currentSignal = pendingSignal;
+ for (
+ ;
+ currentSignal.d &&
+ sortScopeByDOMPosition(currentSignal.d.f, nextSignal.f) <= 0;
+
+ )
+ currentSignal = currentSignal.d;
+ (nextSignal.d = currentSignal.d),
+ (currentSignal.d = nextSignal);
+ }
+ else pendingSignal = nextSignal;
})(scope, valueSignal, valueOrOp),
valueOrOp
);
@@ -341,7 +357,7 @@ function closure(
(ownerScope = getOwnerScope(scope)),
(ownerValueAccessor2 = getOwnerValueAccessor(scope));
let ownerMark = ownerScope[ownerValueAccessor2 + "#"],
- ownerHasRun = void 0 === ownerMark ? !ownerScope.u : 0 === ownerMark;
+ ownerHasRun = void 0 === ownerMark ? !ownerScope.y : 0 === ownerMark;
(scope[markAccessor] = ownerHasRun ? 1 : 2), (op = DIRTY);
}
0 == --scope[markAccessor]
@@ -374,7 +390,7 @@ function dynamicClosure(
),
subscribeFns = new WeakMap();
return (
- (signalFn.g = (scope) => {
+ (signalFn.j = (scope) => {
let subscribeFn = (value2) => signalFn(scope, value2),
ownerScope = getOwnerScope(scope),
providerSubscriptionsAccessor = getOwnerValueAccessor(scope) + "*";
@@ -383,7 +399,7 @@ function dynamicClosure(
subscribeFn,
);
}),
- (signalFn.j = (scope) => {
+ (signalFn.l = (scope) => {
let ownerScope = getOwnerScope(scope),
providerSubscriptionsAccessor = getOwnerValueAccessor(scope) + "*";
ownerScope[providerSubscriptionsAccessor]?.delete(
@@ -400,14 +416,14 @@ function childClosures(closureSignals, childAccessor) {
for (let closureSignal of closureSignals) closureSignal(childScope, op);
};
return (
- (signal.g = (scope) => {
- let childScope = scope[childAccessor];
- for (let closureSignal of closureSignals) closureSignal.g?.(childScope);
- }),
(signal.j = (scope) => {
let childScope = scope[childAccessor];
for (let closureSignal of closureSignals) closureSignal.j?.(childScope);
}),
+ (signal.l = (scope) => {
+ let childScope = scope[childAccessor];
+ for (let closureSignal of closureSignals) closureSignal.l?.(childScope);
+ }),
signal
);
}
@@ -456,35 +472,30 @@ function effect(id, fn) {
}
);
}
-var pendingSignals = [],
+var pendingSignal,
pendingEffects = [],
rendering = !1;
function queueEffect(scope, fn) {
pendingEffects.push(scope, fn);
}
function run() {
- let signals = pendingSignals,
- effects = pendingEffects;
+ let effects = pendingEffects;
try {
- (rendering = !0), (pendingSignals = []), runSignals(signals);
+ (rendering = !0), runSignals();
} finally {
- rendering = !1;
+ (pendingSignal = void 0), (rendering = !1);
}
(pendingEffects = []), runEffects(effects);
}
function prepareEffects(fn) {
- let prevSignals = pendingSignals,
+ let prevSignals = pendingSignal,
prevEffects = pendingEffects,
- preparedEffects = (pendingEffects = []),
- preparedSignals = (pendingSignals = []);
+ preparedEffects = (pendingEffects = []);
try {
- (rendering = !0),
- fn(),
- (pendingSignals = prevSignals),
- runSignals(preparedSignals);
+ (rendering = !0), (pendingSignal = void 0), fn(), runSignals();
} finally {
(rendering = !1),
- (pendingSignals = prevSignals),
+ (pendingSignal = prevSignals),
(pendingEffects = prevEffects);
}
return preparedEffects;
@@ -495,21 +506,41 @@ function runEffects(effects = pendingEffects) {
(0, effects[i + 1])(scope, scope);
}
}
-function runSignals(signals) {
- for (let i = 0; i < signals.length; i += 3) {
- let scope = signals[i + 0];
- (0, signals[i + 1])(scope, signals[i + 2]);
- }
+function runSignals() {
+ for (; pendingSignal; )
+ scopeIsConnected(pendingSignal.f) &&
+ pendingSignal.D(pendingSignal.f, pendingSignal.E),
+ (pendingSignal = pendingSignal.d);
+}
+function scopeIsConnected(scope) {
+ let start = ownerStartNode(scope);
+ return !start || start.isConnected;
+}
+function sortScopeByDOMPosition(a, b) {
+ let aStart = ownerStartNode(a),
+ bStart = ownerStartNode(b);
+ return aStart === bStart
+ ? 0
+ : aStart
+ ? bStart
+ ? 2 & aStart.compareDocumentPosition(bStart)
+ ? -1
+ : 1
+ : -1
+ : 1;
+}
+function ownerStartNode(scope) {
+ return (scope.e || scope).a;
}
function resetAbortSignal(scope, id) {
- let controllers = scope.l;
+ let controllers = scope.n;
if (controllers) {
let ctrl = controllers.get(id);
ctrl && (queueEffect(null, () => ctrl.abort()), controllers.delete(id));
}
}
function getAbortSignal(scope, id) {
- let controllers = (scope.l ||= new Map()),
+ let controllers = (scope.n ||= new Map()),
controller = controllers.get(id);
return (
controller ||
@@ -1071,7 +1102,7 @@ function walkInternal(walkCodes, scope, cleanupOwnerScope, currentWalkIndex) {
currentMultiplier = 0,
currentScopeIndex = 0;
for (
- cleanupOwnerScope !== scope && (scope.d = cleanupOwnerScope);
+ cleanupOwnerScope !== scope && (scope.e = cleanupOwnerScope);
(value2 = walkCodes.charCodeAt(currentWalkIndex++));
)
@@ -1114,12 +1145,12 @@ function walkInternal(walkCodes, scope, cleanupOwnerScope, currentWalkIndex) {
function createScopeWithRenderer(renderer, $global, ownerScope) {
let newScope = createScope($global);
if (
- ((newScope._ = newScope.d = renderer.B || ownerScope),
- (newScope.x = renderer),
+ ((newScope._ = newScope.e = renderer.F || ownerScope),
+ (newScope.z = renderer),
initRenderer(renderer, newScope),
renderer.c)
)
- for (let signal of renderer.c) signal.g?.(newScope);
+ for (let signal of renderer.c) signal.j?.(newScope);
return newScope;
}
function createScopeWithTagNameOrRenderer(
@@ -1131,7 +1162,7 @@ function createScopeWithTagNameOrRenderer(
return createScopeWithRenderer(tagNameOrRenderer, $global, ownerScope);
let newScope = createScope($global);
return (
- (newScope._ = newScope.d = ownerScope),
+ (newScope._ = newScope.e = ownerScope),
(newScope[0] =
newScope.a =
newScope.b =
@@ -1140,12 +1171,12 @@ function createScopeWithTagNameOrRenderer(
);
}
function initRenderer(renderer, scope) {
- let dom = renderer.k();
+ let dom = renderer.m();
return (
- walk(11 === dom.nodeType ? dom.firstChild : dom, renderer.C, scope),
+ walk(11 === dom.nodeType ? dom.firstChild : dom, renderer.G, scope),
(scope.a = 11 === dom.nodeType ? dom.firstChild : dom),
(scope.b = 11 === dom.nodeType ? dom.lastChild : dom),
- renderer.s && renderer.s(scope),
+ renderer.u && renderer.u(scope),
dom
);
}
@@ -1155,14 +1186,14 @@ function dynamicTagAttrs(nodeAccessor, getContent, inputIsArgs) {
if (!renderer || attrsOrOp === DIRTY) return;
let childScope = scope[nodeAccessor + "!"];
if (attrsOrOp === MARK || attrsOrOp === CLEAN)
- return renderer.e?.(childScope, attrsOrOp);
+ return renderer.g?.(childScope, attrsOrOp);
let content = getContent?.(scope);
if ("string" == typeof renderer)
setConditionalRendererOnlyChild(childScope, 0, content),
attrs(childScope, 0, attrsOrOp());
- else if (renderer.e) {
+ else if (renderer.g) {
let attributes = attrsOrOp();
- renderer.e(
+ renderer.g(
childScope,
inputIsArgs
? attributes
@@ -1183,14 +1214,14 @@ function createRendererWithOwner(
id = {},
walks = rawWalks ? trimWalkString(rawWalks) : " ";
return (owner) => ({
- t: id,
- D: template,
- C: walks,
- s: setup,
- k: _clone,
- B: owner,
- E: void 0,
- get e() {
+ x: id,
+ H: template,
+ G: walks,
+ u: setup,
+ m: _clone,
+ F: owner,
+ I: void 0,
+ get g() {
return (args ||= getArgs?.());
},
get c() {
@@ -1208,7 +1239,7 @@ function createRenderer(template, walks, setup, getClosureSignals, getArgs) {
)();
}
function _clone() {
- return (this.E ||= (function (html2) {
+ return (this.I ||= (function (html2) {
let content = parseHTML(html2);
return content.firstChild
? content.firstChild === content.lastChild &&
@@ -1216,7 +1247,7 @@ function _clone() {
? content.firstChild
: content
: fallback;
- })(this.D)).cloneNode(!0);
+ })(this.H)).cloneNode(!0);
}
var conditional = function (nodeAccessor, fn, getIntersection) {
let rendererAccessor = nodeAccessor + "(",
@@ -1338,7 +1369,7 @@ function loopTo(nodeAccessor, renderer) {
function loop(nodeAccessor, renderer, forEach) {
let loopScopeAccessor = nodeAccessor + "!",
closureSignals = renderer.c,
- params = renderer.e;
+ params = renderer.g;
return (scope, valueOrOp) => {
if (valueOrOp === DIRTY) return;
if (valueOrOp === MARK || valueOrOp === CLEAN) {
@@ -1540,7 +1571,7 @@ function byFirstArg(name) {
return name;
}
function isDifferentRenderer(a, b) {
- return a !== b && (a?.t || 0) !== b?.t;
+ return a !== b && (a?.x || 0) !== b?.x;
}
var classIdToScope = new Map(),
compat = {
@@ -1558,7 +1589,7 @@ var classIdToScope = new Map(),
register("$C_r", fn);
},
isOp: (value2) => value2 === MARK || value2 === CLEAN || value2 === DIRTY,
- isRenderer: (renderer) => void 0 !== renderer.k,
+ isRenderer: (renderer) => void 0 !== renderer.m,
getStartNode: (scope) => scope.a,
setScopeNodes(scope, startNode, endNode) {
(scope.a = startNode), (scope.b = endNode);
@@ -1579,7 +1610,7 @@ var classIdToScope = new Map(),
2 === value2.length &&
window[runtimeId]?.[
"s" === componentIdPrefix ? "_" : componentIdPrefix
- ]?.n[value2[1]],
+ ]?.p[value2[1]],
)
: value2,
createRenderer(setup, clone, args) {
@@ -1590,7 +1621,7 @@ var classIdToScope = new Map(),
void 0,
args && (() => args),
);
- return (renderer.k = clone), renderer;
+ return (renderer.m = clone), renderer;
},
render(out, component, renderer, args) {
let scope = component.scope;
@@ -1598,7 +1629,7 @@ var classIdToScope = new Map(),
((scope = classIdToScope.get(component.id)),
scope &&
((component.scope = scope), classIdToScope.delete(component.id)));
- let applyArgs = renderer.e || noop,
+ let applyArgs = renderer.g || noop,
existing = !1;
if ("object" == typeof args[0] && "renderBody" in args[0]) {
let input = args[0],
@@ -1642,7 +1673,7 @@ function mount(input = {}, reference, position) {
? (({ $global: $global, ...input } = input),
($global = { runtimeId: "M", renderId: "_", ...$global }))
: ($global = { runtimeId: "M", renderId: "_" });
- let args = this.e,
+ let args = this.g,
effects = prepareEffects(() => {
(scope = createScope($global)),
(dom = initRenderer(this, scope)),
diff --git a/.sizes/name-cache.json b/.sizes/name-cache.json
index 14076ec32..903f8ade3 100644
--- a/.sizes/name-cache.json
+++ b/.sizes/name-cache.json
@@ -1 +1 @@
-{"vars":{"props":{"$empty":"e","$rest":"t","$attrTag":"n","$attrTags":"r","$attrTagIterator":"i","$forIn":"l","$forOf":"o","$forTo":"f","$isScheduled":"u","$port2":"a","$flushAndWaitFrame":"c","$triggerMacroTask":"s","$createScope":"d","$emptyScope":"h","$getEmptyScope":"g","$destroyScope":"p","$_destroyScope":"v","$onDestroy":"b","$removeAndDestroyScope":"m","$insertBefore":"y","$registeredValues":"k","$Render":"w","$isResuming":"C","$register":"A","$registerBoundSignal":"S","$init":"N","$registerSubscriber":"x","$nodeRef":"$","$MARK":"M","$CLEAN":"E","$DIRTY":"I","$state":"T","$value":"_","$accessorId":"O","$intersection":"B","$defaultGetOwnerScope":"V","$closure":"j","$dynamicClosure":"R","$childClosures":"q","$dynamicSubscribers":"D","$setTagVar":"P","$tagVarSignal":"W","$setTagVarChange":"L","$tagVarSignalChange":"z","$renderBodyClosures":"F","$tagIdsByGlobal":"U","$nextTagId":"G","$inChild":"J","$intersections":"X","$effect":"Z","$pendingSignals":"H","$pendingEffects":"K","$rendering":"Q","$queueEffect":"Y","$run":"ee","$prepareEffects":"te","$runEffects":"ne","$runSignals":"re","$resetAbortSignal":"ie","$getAbortSignal":"le","$stringifyClassObject":"oe","$NON_DIMENSIONAL":"fe","$stringifyStyleObject":"ue","$toDelimitedString":"ae","$isEventHandler":"ce","$getEventHandlerName":"se","$normalizeDynamicRenderer":"de","$elementHandlersByEvent":"he","$defaultDelegator":"ge","$on":"pe","$createDelegator":"ve","$handleDelegated":"be","$stripSpacesAndPunctuation":"me","$controllable_input_checked":"ye","$controllable_input_checked_effect":"ke","$controllable_input_checkedValue":"we","$controllable_input_checkedValue_effect":"Ce","$controllable_input_value":"Ae","$controllable_input_value_effect":"Se","$controllable_select_value":"Ne","$controllable_select_value_effect":"xe","$setSelectOptions":"$e","$controllable_detailsOrDialog_open":"Me","$controllable_detailsOrDialog_open_effect":"Ee","$inputType":"Ie","$setValueAndUpdateSelection":"Te","$setCheckboxValue":"_e","$delegateFormControl":"Oe","$formChangeHandlers":"Be","$syncControllable":"Ve","$onFormChange":"je","$onFormReset":"Re","$hasValueChanged":"qe","$hasCheckboxChanged":"De","$hasSelectChanged":"Pe","$hasFormElementChanged":"We","$normalizeStrProp":"Le","$normalizeBoolProp":"ze","$toValueProp":"Fe","$fallback":"Ue","$parser":"Ge","$parseHTML":"Je","$attr":"Xe","$setAttribute":"Ze","$classAttr":"He","$styleAttr":"Ke","$data":"Qe","$attrs":"Ye","$hasAttrAlias":"et","$partialAttrs":"tt","$attrsInternal":"nt","$attrsEvents":"rt","$html":"it","$props":"lt","$normalizeAttrValue":"ot","$lifecycle":"ft","$walker":"ut","$trimWalkString":"at","$walk":"ct","$walkInternal":"st","$createScopeWithRenderer":"dt","$createScopeWithTagNameOrRenderer":"ht","$initRenderer":"gt","$dynamicTagAttrs":"pt","$createRendererWithOwner":"vt","$createRenderer":"bt","$_clone":"mt","$conditional":"yt","$inConditionalScope":"kt","$conditionalOnlyChild":"wt","$setConditionalRendererOnlyChild":"Ct","$emptyMarkerMap":"At","$emptyMarkerArray":"St","$emptyMap":"Nt","$emptyArray":"xt","$loopOf":"$t","$loopIn":"Mt","$loopTo":"Et","$loop":"It","$inLoopScope":"Tt","$bySecondArg":"_t","$byFirstArg":"Ot","$isDifferentRenderer":"Bt","$classIdToScope":"Vt","$compat":"jt","$noop":"Rt","$createTemplate":"qt","$mount":"Dt","$parseHTMLOrSingleNode":"Wt","$marker":"Ft","$_clickCount_effect":"Qt","$_clickCount":"Yt","$_setup_":"zt","$_expr_comment_comments_id$ifBody":"ss","$_id$ifBody":"as","$_comment_comments$ifBody":"ts","$_ifBody":"ns","$_expr_input_path_i$forBody":"os","$_if$forBody":"cs","$_open$forBody_effect":"is","$_open$forBody":"ms","$_id$forBody":"ls","$_i$forBody":"us","$_comment_comments$forBody":"es","$_comment_text$forBody":"ds","$_comment$forBody":"rs","$_params_2$forBody":"bs","$_input_path$forBody":"ps","$_for":"hs","$_input_path_":"vs","$_input_comments_":"fs","$_input_$1":"js","$_input_":"ks","$_params__":"Ss","$noop2":"Pt","$textContent":"Lt","$normalizeString":"Ut","$contentClosures":"Gt","$_expr_comment_comments_id$if_content":"Zs","$_id$if_content":"$s","$_comment_comments$if_content":"_s","$_if_content":"gs","$_expr_input_path_i$for_content":"ws","$_if$for_content":"xs","$_open$for_content_effect":"Bs","$_open$for_content":"Ds","$_id$for_content":"Es","$_i$for_content":"Hs","$_comment_comments$for_content":"Xs","$_comment_text$for_content":"qs","$_comment$for_content":"ys","$_params_2$for_content":"zs","$_input_path$for_content":"As"}}}
\ No newline at end of file
+{"vars":{"props":{"$empty":"e","$rest":"t","$attrTag":"n","$attrTags":"r","$attrTagIterator":"i","$forIn":"l","$forOf":"o","$forTo":"f","$isScheduled":"u","$port2":"a","$flushAndWaitFrame":"c","$triggerMacroTask":"s","$createScope":"d","$emptyScope":"h","$getEmptyScope":"g","$destroyScope":"p","$_destroyScope":"v","$onDestroy":"b","$removeAndDestroyScope":"m","$insertBefore":"y","$registeredValues":"k","$Render":"w","$isResuming":"C","$register":"A","$registerBoundSignal":"S","$init":"N","$registerSubscriber":"x","$nodeRef":"$","$MARK":"M","$CLEAN":"E","$DIRTY":"I","$state":"T","$value":"_","$accessorId":"O","$intersection":"B","$defaultGetOwnerScope":"V","$closure":"j","$dynamicClosure":"R","$childClosures":"q","$dynamicSubscribers":"D","$setTagVar":"P","$tagVarSignal":"W","$setTagVarChange":"L","$tagVarSignalChange":"z","$renderBodyClosures":"F","$tagIdsByGlobal":"U","$nextTagId":"G","$inChild":"J","$intersections":"X","$effect":"Z","$pendingSignals":"H","$pendingEffects":"K","$rendering":"Q","$queueEffect":"Y","$run":"ee","$prepareEffects":"te","$runEffects":"ne","$runSignals":"re","$resetAbortSignal":"ie","$getAbortSignal":"le","$stringifyClassObject":"oe","$NON_DIMENSIONAL":"fe","$stringifyStyleObject":"ue","$toDelimitedString":"ae","$isEventHandler":"ce","$getEventHandlerName":"se","$normalizeDynamicRenderer":"de","$elementHandlersByEvent":"he","$defaultDelegator":"ge","$on":"pe","$createDelegator":"ve","$handleDelegated":"be","$stripSpacesAndPunctuation":"me","$controllable_input_checked":"ye","$controllable_input_checked_effect":"ke","$controllable_input_checkedValue":"we","$controllable_input_checkedValue_effect":"Ce","$controllable_input_value":"Ae","$controllable_input_value_effect":"Se","$controllable_select_value":"Ne","$controllable_select_value_effect":"xe","$setSelectOptions":"$e","$controllable_detailsOrDialog_open":"Me","$controllable_detailsOrDialog_open_effect":"Ee","$inputType":"Ie","$setValueAndUpdateSelection":"Te","$setCheckboxValue":"_e","$delegateFormControl":"Oe","$formChangeHandlers":"Be","$syncControllable":"Ve","$onFormChange":"je","$onFormReset":"Re","$hasValueChanged":"qe","$hasCheckboxChanged":"De","$hasSelectChanged":"Pe","$hasFormElementChanged":"We","$normalizeStrProp":"Le","$normalizeBoolProp":"ze","$toValueProp":"Fe","$fallback":"Ue","$parser":"Ge","$parseHTML":"Je","$attr":"Xe","$setAttribute":"Ze","$classAttr":"He","$styleAttr":"Ke","$data":"Qe","$attrs":"Ye","$hasAttrAlias":"et","$partialAttrs":"tt","$attrsInternal":"nt","$attrsEvents":"rt","$html":"it","$props":"lt","$normalizeAttrValue":"ot","$lifecycle":"ft","$walker":"ut","$trimWalkString":"at","$walk":"ct","$walkInternal":"st","$createScopeWithRenderer":"dt","$createScopeWithTagNameOrRenderer":"ht","$initRenderer":"gt","$dynamicTagAttrs":"pt","$createRendererWithOwner":"vt","$createRenderer":"bt","$_clone":"mt","$conditional":"yt","$inConditionalScope":"kt","$conditionalOnlyChild":"wt","$setConditionalRendererOnlyChild":"Ct","$emptyMarkerMap":"At","$emptyMarkerArray":"St","$emptyMap":"Nt","$emptyArray":"xt","$loopOf":"$t","$loopIn":"Mt","$loopTo":"Et","$loop":"It","$inLoopScope":"Tt","$bySecondArg":"_t","$byFirstArg":"Ot","$isDifferentRenderer":"Bt","$classIdToScope":"Vt","$compat":"jt","$noop":"Rt","$createTemplate":"qt","$mount":"Dt","$parseHTMLOrSingleNode":"Wt","$marker":"Ft","$_clickCount_effect":"Qt","$_clickCount":"Yt","$_setup_":"zt","$_expr_comment_comments_id$ifBody":"ss","$_id$ifBody":"as","$_comment_comments$ifBody":"ts","$_ifBody":"ns","$_expr_input_path_i$forBody":"os","$_if$forBody":"cs","$_open$forBody_effect":"is","$_open$forBody":"ms","$_id$forBody":"ls","$_i$forBody":"us","$_comment_comments$forBody":"es","$_comment_text$forBody":"ds","$_comment$forBody":"rs","$_params_2$forBody":"bs","$_input_path$forBody":"ps","$_for":"hs","$_input_path_":"vs","$_input_comments_":"fs","$_input_$1":"js","$_input_":"ks","$_params__":"Ss","$noop2":"Pt","$textContent":"Lt","$normalizeString":"Ut","$contentClosures":"Gt","$_expr_comment_comments_id$if_content":"Zs","$_id$if_content":"$s","$_comment_comments$if_content":"_s","$_if_content":"gs","$_expr_input_path_i$for_content":"ws","$_if$for_content":"xs","$_open$for_content_effect":"Bs","$_open$for_content":"Ds","$_id$for_content":"Es","$_i$for_content":"Hs","$_comment_comments$for_content":"Xs","$_comment_text$for_content":"qs","$_comment$for_content":"ys","$_params_2$for_content":"zs","$_input_path$for_content":"As","$pendingSignal":"Ht","$scopeIsConnected":"Jt","$sortScopeByDOMPosition":"Xt","$ownerStartNode":"Zt"}}}
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/abort-signal-render-phase-error/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/abort-signal-render-phase-error/__snapshots__/html.expected/template.js
index 6e803fe64..4b01fc51a 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/abort-signal-render-phase-error/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/abort-signal-render-phase-error/__snapshots__/html.expected/template.js
@@ -1,8 +1,9 @@
import * as _$ from "@marko/runtime-tags/debug/html";
const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
const _scope0_id = _$.nextScopeId();
- _$.write(`
${_$.markResumeCleanup(_scope0_id)}${_$.escapeXML((() => {
+ _$.write(`
${_$.escapeXML((() => {
throw new Error("Cannot use $signal in a server render.");
})().onabort = () => {})}
`);
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/html.expected/template.js
index e3b44d804..3462dc006 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/html.expected/template.js
@@ -8,5 +8,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"clickCount": clickCount
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/resume.expected.md
index b4456dd4f..28bc54728 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/resume.expected.md
@@ -15,6 +15,7 @@
+
@@ -47,6 +48,7 @@ container.querySelector("button").click()
0
+
@@ -80,6 +82,7 @@ container.querySelector("button").click()
1
+
@@ -113,6 +116,7 @@ container.querySelector("button").click()
2
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/ssr.expected.md
index 418aeeea7..b7987ab24 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/assignment-before-tag-var/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
+ 0 was
+
+ 0 was
# Render "End"
@@ -19,6 +19,7 @@
+
@@ -41,6 +42,7 @@ inserted #document/html0/body1/span2/#text2
inserted #document/html0/body1/span2/#comment3
inserted #document/html0/body1/span2/#text4
inserted #document/html0/body1/span2/#comment5
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/html.expected/template.js
index 542cac2d3..b53fb7bcb 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/html.expected/template.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"disabled": disabled
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/resume.expected.md
index 160237535..93f9cdba6 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/resume.expected.md
@@ -12,6 +12,7 @@
+
@@ -39,6 +40,7 @@ container.querySelector("button").click()
+
@@ -69,6 +71,7 @@ container.querySelector("button").click()
+
@@ -97,6 +100,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/ssr.expected.md
index 9489ee40a..4f0121214 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/attr-boolean-dynamic/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
enable
+
enable
# Render "End"
@@ -16,6 +16,7 @@
+
@@ -34,6 +35,7 @@ inserted #document/html0/body1/button2
inserted #document/html0/body1/button2/#text0
inserted #document/html0/body1/button2/#comment1
inserted #document/html0/body1/#comment3
-inserted #document/html0/body1/script4
-inserted #document/html0/body1/script4/#text0
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/script5
+inserted #document/html0/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/html.expected/template.js
index 0ee138fae..1a16da5d2 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/html.expected/template.js
@@ -10,6 +10,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
});
_$.fork(resolveAfter("b", 2), value => {
const _scope2_id = _$.nextScopeId();
@@ -17,6 +18,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope2_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope2_id);
});
_$.fork(resolveAfter("c", 1), value => {
const _scope3_id = _$.nextScopeId();
@@ -24,11 +26,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope3_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope3_id);
});
_$.write(`
Inc ${_$.markResumeNode(_scope0_id, "#button/0")}
`);
_$.writeEffect(_scope0_id, "__tests__/template.marko_0_count");
_$.writeScope(_scope0_id, {
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/ssr.expected.md
index c4729dbe0..47e9e1dc0 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Got: a 0
+
Got: a 0
# Write
@@ -7,7 +7,7 @@
# Write
- Got: b 0Got: c 0Inc
+ Got: b 0Got: c 0
Inc
# Render "End"
@@ -20,6 +20,7 @@
0
+
@@ -30,15 +31,18 @@
0
+
Got: c
0
+
Inc
+
@@ -56,21 +60,25 @@ inserted #document/html0/body1/div0/#text0
inserted #document/html0/body1/div0/#comment1
inserted #document/html0/body1/div0/#text2
inserted #document/html0/body1/div0/#comment3
-inserted #document/html0/body1/div0/script4
-inserted #document/html0/body1/div0/script4/#text0
+inserted #document/html0/body1/div0/#comment4
inserted #document/html0/body1/div0/script5
inserted #document/html0/body1/div0/script5/#text0
-inserted #document/html0/body1/div0/#text6
-inserted #document/html0/body1/div0/#comment7
-inserted #document/html0/body1/div0/#text8
-inserted #document/html0/body1/div0/#comment9
-inserted #document/html0/body1/div0/#text10
+inserted #document/html0/body1/div0/script6
+inserted #document/html0/body1/div0/script6/#text0
+inserted #document/html0/body1/div0/#text7
+inserted #document/html0/body1/div0/#comment8
+inserted #document/html0/body1/div0/#text9
+inserted #document/html0/body1/div0/#comment10
inserted #document/html0/body1/div0/#comment11
inserted #document/html0/body1/div0/#text12
inserted #document/html0/body1/div0/#comment13
-inserted #document/html0/body1/div0/button14
-inserted #document/html0/body1/div0/button14/#text0
+inserted #document/html0/body1/div0/#text14
inserted #document/html0/body1/div0/#comment15
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/div0/#comment16
+inserted #document/html0/body1/div0/button17
+inserted #document/html0/body1/div0/button17/#text0
+inserted #document/html0/body1/div0/#comment18
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-chain/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-chain/__snapshots__/html.expected/template.js
index 38847cde7..8a25c18cb 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-chain/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-chain/__snapshots__/html.expected/template.js
@@ -5,5 +5,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
const y = x * 2;
const z = y * 3;
_$.write(`${_$.escapeXML(z)}${_$.markResumeNode(_scope0_id, "#text/0")}
`);
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-chain/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-chain/__snapshots__/resume.expected.md
index f2f72c550..ce1e61736 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-chain/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-chain/__snapshots__/resume.expected.md
@@ -7,6 +7,7 @@
6
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-chain/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-chain/__snapshots__/ssr.expected.md
index c27fa597b..1ea6661eb 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-chain/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-chain/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 6
+ 6
# Render "End"
@@ -11,6 +11,7 @@
6
+
@@ -26,6 +27,7 @@ inserted #document/html0/body1
inserted #document/html0/body1/div0
inserted #document/html0/body1/div0/#text0
inserted #document/html0/body1/div0/#comment1
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/html.expected/template.js
index e103c1058..e237f577b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/html.expected/template.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"clickCount": clickCount,
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/resume.expected.md
index 3b8894c72..8568d9283 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
+
@@ -33,6 +34,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/ssr.expected.md
index abde917a8..a0d497f26 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-attrs/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -12,6 +12,7 @@
+
@@ -28,6 +29,7 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/html.expected/template.js
index e103c1058..e237f577b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/html.expected/template.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"clickCount": clickCount,
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/resume.expected.md
index 36bf6f3f4..fd7d01cbc 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
+
@@ -33,6 +34,7 @@ container.querySelector("button").click()
+
@@ -58,6 +60,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/ssr.expected.md
index abde917a8..a0d497f26 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-alias/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -12,6 +12,7 @@
+
@@ -28,6 +29,7 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/html.expected/template.js
index 118a653f6..6b0d64f55 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/html.expected/template.js
@@ -26,5 +26,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#childScope/0": _$.writeExistingScope(_childScope),
"#childScope/1": _$.writeExistingScope(_childScope2)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/resume.expected.md
index 2dee1c914..5c51fde6e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/resume.expected.md
@@ -21,6 +21,7 @@
+
@@ -59,6 +60,7 @@ container.querySelector("button").click()
+
@@ -100,6 +102,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/ssr.expected.md
index 0549a8b6c..2748817ac 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias-within-pattern/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 0 0 0
+ 0 0 0 0
# Render "End"
@@ -25,6 +25,7 @@
+
@@ -53,6 +54,7 @@ inserted #document/html0/body1/button2/#comment3
inserted #document/html0/body1/button2/#text4
inserted #document/html0/body1/button2/#comment5
inserted #document/html0/body1/#comment3
-inserted #document/html0/body1/script4
-inserted #document/html0/body1/script4/#text0
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/script5
+inserted #document/html0/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/html.expected/template.js
index e103c1058..e237f577b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/html.expected/template.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"clickCount": clickCount,
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/resume.expected.md
index 2e558a972..4ccc5e5b1 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/resume.expected.md
@@ -12,6 +12,7 @@
+
@@ -41,6 +42,7 @@ container.querySelector("button").click()
+
@@ -71,6 +73,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/ssr.expected.md
index a08c728d5..ed6187a0c 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input-same-source-alias/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 0
+ 0 0
# Render "End"
@@ -16,6 +16,7 @@
+
@@ -36,6 +37,7 @@ inserted #document/html0/body1/button0/#comment3
inserted #document/html0/body1/button0/#text4
inserted #document/html0/body1/button0/#comment5
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/html.expected/template.js
index e103c1058..e237f577b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/html.expected/template.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"clickCount": clickCount,
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/resume.expected.md
index 36bf6f3f4..fd7d01cbc 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
+
@@ -33,6 +34,7 @@ container.querySelector("button").click()
+
@@ -58,6 +60,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/ssr.expected.md
index abde917a8..a0d497f26 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-input/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -12,6 +12,7 @@
+
@@ -28,6 +29,7 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/html.expected/template.js
index e6f78dd1d..d3c83886f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/html.expected/template.js
@@ -15,11 +15,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
}), "__tests__/template.marko_1_renderer", _scope0_id)
});
_$.writeScope(_scope0_id, {
"clickCount": clickCount,
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/resume.expected.md
index 915097d22..fe5f10de0 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/resume.expected.md
@@ -7,9 +7,11 @@
0
+
+
@@ -34,9 +36,11 @@ container.querySelector("button").click()
1
+
+
@@ -61,9 +65,11 @@ container.querySelector("button").click()
2
+
+
@@ -88,9 +94,11 @@ container.querySelector("button").click()
3
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/ssr.expected.md
index 4ecb7b83d..60447d2d8 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -11,9 +11,11 @@
0
+
+
@@ -31,7 +33,9 @@ inserted #document/html0/body1/button0/#comment0
inserted #document/html0/body1/button0/#text1
inserted #document/html0/body1/button0/#comment2
inserted #document/html0/body1/button0/#comment3
+inserted #document/html0/body1/button0/#comment4
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/html.expected/tags/counter.js
index 825ab410e..022cfce33 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/html.expected/tags/counter.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/html.expected/tags/counter.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"clickCount": clickCount
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/counter.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/resume.expected.md
index f64c08b77..494ed7f22 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-component/__snapshots__/resume.expected.md
@@ -9,6 +9,7 @@
+
+ 0
# Render "End"
@@ -13,6 +13,7 @@
+
@@ -50,7 +52,9 @@ container.querySelector("button.inc").click()
1
+
+
@@ -81,6 +85,8 @@ container.querySelector("button.toggle").click()
+
+
@@ -90,7 +96,7 @@ container.querySelector("button.toggle").click()
# Mutations
```
-removed #document/html0/body1/#comment4 after #document/html0/body1/#comment5
+removed #document/html0/body1/#comment4 after #document/html0/body1/#comment6
inserted #document/html0/body1/#comment4
removed #comment after #document/html0/body1/#comment4
removed #text after #document/html0/body1/#comment4
@@ -116,6 +122,8 @@ container.querySelector("button.inc").click()
+
+
@@ -146,6 +154,8 @@ container.querySelector("button.toggle").click()
The count is 2
+
+
@@ -179,6 +189,8 @@ container.querySelector("button.inc").click()
The count is 3
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter-multiple-nodes/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter-multiple-nodes/__snapshots__/ssr.expected.md
index e6e096c00..262725b35 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter-multiple-nodes/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter-multiple-nodes/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- The count is 0
+ The count is 0
# Render "End"
@@ -20,7 +20,9 @@
0
+
+
@@ -43,6 +45,8 @@ inserted #document/html0/body1/#comment6
inserted #document/html0/body1/#text7
inserted #document/html0/body1/#comment8
inserted #document/html0/body1/#comment9
-inserted #document/html0/body1/script10
-inserted #document/html0/body1/script10/#text0
+inserted #document/html0/body1/#comment10
+inserted #document/html0/body1/#comment11
+inserted #document/html0/body1/script12
+inserted #document/html0/body1/script12/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/html.expected/template.js
index 99cf5aca6..06043d131 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/html.expected/template.js
@@ -11,6 +11,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
_ifScopeId = _scope1_id;
}
@@ -23,5 +24,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/2(": _ifRenderer,
"#text/2!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/resume.expected.md
index a8bc0bbb5..6c799e3fa 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/resume.expected.md
@@ -15,7 +15,9 @@
0
+
+
@@ -48,7 +50,9 @@ container.querySelector("button.inc").click()
1
+
+
@@ -78,6 +82,8 @@ container.querySelector("button.toggle").click()
/>
+
+
@@ -87,7 +93,7 @@ container.querySelector("button.toggle").click()
# Mutations
```
-removed #document/html0/body1/#comment4 after span
+removed #document/html0/body1/#comment4 after #document/html0/body1/#comment5
inserted #document/html0/body1/#comment4
removed span after #document/html0/body1/#comment4
```
@@ -109,6 +115,8 @@ container.querySelector("button.inc").click()
/>
+
+
@@ -140,6 +148,8 @@ container.querySelector("button.toggle").click()
2
+
+
@@ -173,6 +183,8 @@ container.querySelector("button.inc").click()
3
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/ssr.expected.md
index 6c0c5d44e..31561ec52 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -19,7 +19,9 @@
0
+
+
@@ -40,6 +42,8 @@ inserted #document/html0/body1/span4
inserted #document/html0/body1/span4/#text0
inserted #document/html0/body1/span4/#comment1
inserted #document/html0/body1/#comment5
-inserted #document/html0/body1/script6
-inserted #document/html0/body1/script6/#text0
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/#comment7
+inserted #document/html0/body1/script8
+inserted #document/html0/body1/script8/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/html.expected/template.js
index bc3f75526..c5cbeabde 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/html.expected/template.js
@@ -10,6 +10,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_ifScopeId = _scope1_id;
}
_$.writeScope(_scope0_id, {
@@ -17,5 +18,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"b": b,
"#text/0!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/resume.expected.md
index 2bab2463f..5b241b56d 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/resume.expected.md
@@ -5,6 +5,8 @@
0
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/ssr.expected.md
index b7fa8ce78..fb787ed1e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-converge-in-if/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -9,6 +9,8 @@
0
+
+
@@ -23,6 +25,8 @@ inserted #document/html0/head0
inserted #document/html0/body1
inserted #document/html0/body1/#text0
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/html.expected/template.js
index 5114ce019..3221f4e30 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/html.expected/template.js
@@ -11,5 +11,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"clickCount": clickCount,
"increment": increment
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/resume.expected.md
index 548af5a5b..7f2f50e8c 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
+
@@ -33,6 +34,7 @@ container.querySelector("button").click()
+
@@ -58,6 +60,7 @@ container.querySelector("button").click()
+
@@ -83,6 +86,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/ssr.expected.md
index d5edbd7f6..c14082279 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-const-event-handler/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -12,6 +12,7 @@
+
@@ -28,6 +29,7 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/html.expected/template.js
index d86c3e35c..bfa1d63f8 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/html.expected/template.js
@@ -11,5 +11,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"count": count,
"multiplier": multiplier
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/resume.expected.md
index b30a55dd4..00e92d436 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/resume.expected.md
@@ -23,6 +23,7 @@
0
+
@@ -63,6 +64,7 @@ container.querySelector("button#count").click()
1
+
@@ -103,6 +105,7 @@ container.querySelector("button#count").click()
2
+
@@ -143,6 +146,7 @@ container.querySelector("button#multiplier").click()
4
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/ssr.expected.md
index 1a49884e0..50e4c8274 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-counter-multiplier/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- increase multiplier (1) increase count 0
+ increase multiplier (1) increase count 0
# Render "End"
@@ -27,6 +27,7 @@
0
+
@@ -52,6 +53,7 @@ inserted #document/html0/body1/#comment3
inserted #document/html0/body1/div4
inserted #document/html0/body1/div4/#text0
inserted #document/html0/body1/div4/#comment1
-inserted #document/html0/body1/script5
-inserted #document/html0/body1/script5/#text0
+inserted #document/html0/body1/#comment5
+inserted #document/html0/body1/script6
+inserted #document/html0/body1/script6/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/html.expected/template.js
index f1cef808b..784422e2e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/html.expected/template.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"clickCount": clickCount
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/resume.expected.md
index 6a3b7246d..d2e2a3a14 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/resume.expected.md
@@ -10,6 +10,7 @@
+
@@ -37,6 +38,7 @@ container.querySelector("button").click()
+
@@ -64,6 +66,7 @@ container.querySelector("button").click()
+
@@ -91,6 +94,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/ssr.expected.md
index be45fdc7f..0aa1b1882 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-counter/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -14,6 +14,7 @@
+
@@ -31,6 +32,7 @@ inserted #document/html0/body1/div0/button0
inserted #document/html0/body1/div0/button0/#text0
inserted #document/html0/body1/div0/button0/#comment1
inserted #document/html0/body1/div0/#comment1
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/html.expected/template.js
index 896baf3db..d24813cc8 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/html.expected/template.js
@@ -13,6 +13,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
_ifScopeId = _scope1_id;
}
@@ -23,5 +24,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/1(": _ifRenderer,
"#text/1!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/resume.expected.md
index 3a371d834..d6e3daa42 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/resume.expected.md
@@ -9,7 +9,9 @@
hi
+
+
@@ -36,6 +38,8 @@ container.querySelector("button").click()
+
+
@@ -45,7 +49,7 @@ container.querySelector("button").click()
# Mutations
```
-removed #document/html0/body1/#comment2 after #document/html0/body1/#comment3
+removed #document/html0/body1/#comment2 after #document/html0/body1/#comment4
inserted #document/html0/body1/#comment2
removed #text after #document/html0/body1/#comment2
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/ssr.expected.md
index 2c7a0a549..f4047dd40 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- hide hi
+ hide hi
# Render "End"
@@ -13,7 +13,9 @@
hi
+
+
@@ -32,6 +34,8 @@ inserted #document/html0/body1/#comment1
inserted #document/html0/body1/#text2
inserted #document/html0/body1/#comment3
inserted #document/html0/body1/#comment4
-inserted #document/html0/body1/script5
-inserted #document/html0/body1/script5/#text0
+inserted #document/html0/body1/#comment5
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/script7
+inserted #document/html0/body1/script7/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/html.expected/template.js
index 2c4d54d51..6cc7666e0 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/html.expected/template.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/resume.expected.md
index 83eace226..0928da589 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
+
@@ -33,6 +34,7 @@ container.querySelector("button").click()
+
@@ -58,6 +60,7 @@ container.querySelector("button").click()
+
@@ -83,6 +86,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/ssr.expected.md
index 74620fc1b..09954aaf0 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-fn-with-block/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -12,6 +12,7 @@
+
@@ -28,6 +29,7 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/html.expected/template.js
index 1c3946d97..a523cea10 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/html.expected/template.js
@@ -9,5 +9,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"a": a,
"b": b
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/resume.expected.md
index 7b61cfbbc..2af01264e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
+
@@ -33,6 +34,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/ssr.expected.md
index 691bdae96..c3603fe66 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-multi-ref-nested/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -12,6 +12,7 @@
+
@@ -28,6 +29,7 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-refless/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-refless/__snapshots__/html.expected/template.js
index 96f8b88ae..6b052596a 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-refless/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-refless/__snapshots__/html.expected/template.js
@@ -4,5 +4,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
const data = 0;
_$.write(`${_$.escapeXML(data)}${_$.markResumeNode(_scope0_id, "#text/1")} ${_$.markResumeNode(_scope0_id, "#button/0")}`);
_$.writeEffect(_scope0_id, "__tests__/template.marko_0");
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-refless/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-refless/__snapshots__/resume.expected.md
index 511af61ba..25dd82d91 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-refless/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-refless/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
+
@@ -33,6 +34,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-refless/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-refless/__snapshots__/ssr.expected.md
index f6251ce5e..a30895b8c 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-handler-refless/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-handler-refless/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -12,6 +12,7 @@
+
@@ -28,6 +29,7 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/html.expected/tags/comments.js b/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/html.expected/tags/comments.js
index 7d9e425b4..5b038f2c3 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/html.expected/tags/comments.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/html.expected/tags/comments.js
@@ -21,6 +21,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#childScope/0": _$.writeExistingScope(_childScope),
"_": _$.ensureScopeWithId(_scope1_id)
});
+ _$.markResumeCleanup(_scope2_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/tags/comments.marko_2_renderer");
_ifScopeId = _scope2_id;
}
@@ -36,6 +37,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/4!": _$.getScopeById(_ifScopeId),
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_scope1_.set(i, _$.getScopeById(_scope1_id));
});
_$.write(`${_$.markResumeControlSingleNodeEnd(_scope0_id, "#ul/0", _forScopeIds)}${_$.markResumeNode(_scope0_id, "#ul/0")}`);
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/resume.expected.md
index ce79746ab..029c32783 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/resume.expected.md
@@ -32,12 +32,15 @@
+
+
+
@@ -53,6 +56,7 @@
+
@@ -106,12 +110,15 @@ container.querySelector(`#c-${id} > button`).click()
+
+
+
@@ -127,6 +134,7 @@ container.querySelector(`#c-${id} > button`).click()
+
@@ -180,12 +188,15 @@ container.querySelector(`#c-${id} > button`).click()
+
+
+
@@ -201,6 +212,7 @@ container.querySelector(`#c-${id} > button`).click()
+
@@ -255,12 +267,15 @@ container.querySelector(`#c-${id} > button`).click()
+
+
+
@@ -276,6 +291,7 @@ container.querySelector(`#c-${id} > button`).click()
+
@@ -330,12 +346,15 @@ container.querySelector(`#c-${id} > button`).click()
+
+
+
button`).click()
+
@@ -364,6 +384,6 @@ container.querySelector(`#c-${id} > button`).click()
# Mutations
```
-#document/html0/body1/ul0/li2: attr(hidden) null => ""
-#document/html0/body1/ul0/li2/button1/#text0: "[-]" => "[+]"
+#document/html0/body1/ul0/li3: attr(hidden) null => ""
+#document/html0/body1/ul0/li3/button1/#text0: "[-]" => "[+]"
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/ssr.expected.md
index 3e3829d84..a876adb35 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Hello World [-] Goodbye World [-]
+ Hello World [-] Goodbye World [-]
# Render "End"
@@ -36,12 +36,15 @@
+
+
+
@@ -57,6 +60,7 @@
+
@@ -93,20 +97,24 @@ inserted #document/html0/body1/ul0/li0/ul3/li0/#comment2
inserted #document/html0/body1/ul0/li0/ul3/li0/#comment3
inserted #document/html0/body1/ul0/li0/ul3/#comment1
inserted #document/html0/body1/ul0/li0/ul3/#comment2
+inserted #document/html0/body1/ul0/li0/ul3/#comment3
inserted #document/html0/body1/ul0/li0/#comment4
inserted #document/html0/body1/ul0/li0/#comment5
+inserted #document/html0/body1/ul0/li0/#comment6
inserted #document/html0/body1/ul0/#comment1
-inserted #document/html0/body1/ul0/li2
-inserted #document/html0/body1/ul0/li2/span0
-inserted #document/html0/body1/ul0/li2/span0/#text0
-inserted #document/html0/body1/ul0/li2/span0/#comment1
-inserted #document/html0/body1/ul0/li2/button1
-inserted #document/html0/body1/ul0/li2/button1/#text0
-inserted #document/html0/body1/ul0/li2/button1/#comment1
-inserted #document/html0/body1/ul0/li2/#comment2
-inserted #document/html0/body1/ul0/li2/#comment3
-inserted #document/html0/body1/ul0/#comment3
+inserted #document/html0/body1/ul0/#comment2
+inserted #document/html0/body1/ul0/li3
+inserted #document/html0/body1/ul0/li3/span0
+inserted #document/html0/body1/ul0/li3/span0/#text0
+inserted #document/html0/body1/ul0/li3/span0/#comment1
+inserted #document/html0/body1/ul0/li3/button1
+inserted #document/html0/body1/ul0/li3/button1/#text0
+inserted #document/html0/body1/ul0/li3/button1/#comment1
+inserted #document/html0/body1/ul0/li3/#comment2
+inserted #document/html0/body1/ul0/li3/#comment3
inserted #document/html0/body1/ul0/#comment4
+inserted #document/html0/body1/ul0/#comment5
+inserted #document/html0/body1/ul0/#comment6
inserted #document/html0/body1/#comment1
inserted #document/html0/body1/script2
inserted #document/html0/body1/script2/#text0
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/html.expected/template.js
index 0d6fda7df..873e49312 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/html.expected/template.js
@@ -14,6 +14,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
}), "__tests__/template.marko_1_renderer", _scope0_id)
});
_$.writeScope(_scope0_id, {
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/resume.expected.md
index fbd47e793..9444b9972 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/resume.expected.md
@@ -10,6 +10,7 @@
World
+
+ Hello World
# Render "End"
@@ -14,6 +14,7 @@
World
+
@@ -43,6 +44,7 @@ container.querySelector("button").click()
Click
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-merge-member-expression/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-merge-member-expression/__snapshots__/ssr.expected.md
index b10891c6f..cdcb29171 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-merge-member-expression/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-merge-member-expression/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
Click
+
Click
# Render "End"
@@ -15,6 +15,7 @@
Click
+
@@ -34,6 +35,7 @@ inserted #document/html0/body1/#comment3
inserted #document/html0/body1/button4
inserted #document/html0/body1/button4/#text0
inserted #document/html0/body1/#comment5
-inserted #document/html0/body1/script6
-inserted #document/html0/body1/script6/#text0
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/script7
+inserted #document/html0/body1/script7/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/html.expected/template.js
index 3609a4e3b..a1bd664d7 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/html.expected/template.js
@@ -21,6 +21,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#childScope/0": _$.writeExistingScope(_childScope),
"_": _$.ensureScopeWithId(_scope1_id)
});
+ _$.markResumeCleanup(_scope2_id);
_scope2_.set(_index, _$.getScopeById(_scope2_id));
});
_forScopeIds2.push(_scope1_id);
@@ -30,6 +31,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0(": _scope2_.size ? _scope2_ : undefined,
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_scope1_.set(_index2, _$.getScopeById(_scope1_id));
});
_$.write(_$.markResumeControlSingleNodeEnd(_scope0_id, "#text/1", _forScopeIds2));
@@ -38,5 +40,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"items": items,
"#text/1(": _scope1_.size ? _scope1_ : undefined
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/resume.expected.md
index ec5aaf51f..fc55f013b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/resume.expected.md
@@ -11,21 +11,28 @@
0.0
+
0.1
+
+
1.0
+
1.1
+
+
+
@@ -54,6 +61,7 @@ container.querySelector("button").click()
0.0
+
0.1
@@ -61,11 +69,14 @@ container.querySelector("button").click()
0.2
+
+
1.0
+
1.1
@@ -84,8 +95,11 @@ container.querySelector("button").click()
2.2
+
+
+
@@ -95,13 +109,13 @@ container.querySelector("button").click()
# Mutations
```
-inserted #document/html0/body1/#comment9
-inserted #text
inserted #document/html0/body1/#comment13
-inserted #document/html0/body1/div4
-inserted #document/html0/body1/div8
-inserted #document/html0/body1/div10
-inserted #document/html0/body1/div11
+inserted #text
+inserted #document/html0/body1/#comment17
+inserted #document/html0/body1/div5
inserted #document/html0/body1/div12
-removed #text after #document/html0/body1/#comment9
+inserted #document/html0/body1/div14
+inserted #document/html0/body1/div15
+inserted #document/html0/body1/div16
+removed #text after #document/html0/body1/#comment13
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/ssr.expected.md
index a1dd766c2..3060a3e19 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
Push 0.0
0.1
1.0
1.1
+
Push 0.0
0.1
1.0
1.1
# Render "End"
@@ -15,21 +15,28 @@
0.0
+
0.1
+
+
1.0
+
1.1
+
+
+
@@ -48,18 +55,25 @@ inserted #document/html0/body1/#comment1
inserted #document/html0/body1/div2
inserted #document/html0/body1/div2/#text0
inserted #document/html0/body1/div2/#comment1
-inserted #document/html0/body1/div3
-inserted #document/html0/body1/div3/#text0
-inserted #document/html0/body1/div3/#comment1
-inserted #document/html0/body1/#comment4
-inserted #document/html0/body1/div5
-inserted #document/html0/body1/div5/#text0
-inserted #document/html0/body1/div5/#comment1
-inserted #document/html0/body1/div6
-inserted #document/html0/body1/div6/#text0
-inserted #document/html0/body1/div6/#comment1
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/div4
+inserted #document/html0/body1/div4/#text0
+inserted #document/html0/body1/div4/#comment1
+inserted #document/html0/body1/#comment5
+inserted #document/html0/body1/#comment6
inserted #document/html0/body1/#comment7
-inserted #document/html0/body1/#comment8
-inserted #document/html0/body1/script9
-inserted #document/html0/body1/script9/#text0
+inserted #document/html0/body1/div8
+inserted #document/html0/body1/div8/#text0
+inserted #document/html0/body1/div8/#comment1
+inserted #document/html0/body1/#comment9
+inserted #document/html0/body1/div10
+inserted #document/html0/body1/div10/#text0
+inserted #document/html0/body1/div10/#comment1
+inserted #document/html0/body1/#comment11
+inserted #document/html0/body1/#comment12
+inserted #document/html0/body1/#comment13
+inserted #document/html0/body1/#comment14
+inserted #document/html0/body1/#comment15
+inserted #document/html0/body1/script16
+inserted #document/html0/body1/script16/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/html.expected/template.js
index 5b0ed73fc..e4636ae74 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/html.expected/template.js
@@ -20,6 +20,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope2_id, {
"_": _$.ensureScopeWithId(_scope1_id)
});
+ _$.markResumeCleanup(_scope2_id);
}), "__tests__/template.marko_2_renderer", _scope1_id)
});
_$.writeEffect(_scope1_id, "__tests__/template.marko_1_y/subscriber");
@@ -28,6 +29,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#childScope/0": _$.writeExistingScope(_childScope),
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
}), "__tests__/template.marko_1_renderer", _scope0_id)
});
_$.writeEffect(_scope0_id, "__tests__/template.marko_0_x");
@@ -36,5 +38,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"y": y,
"#childScope/1": _$.writeExistingScope(_childScope2)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/resume.expected.md
index 388c134a0..b75110b37 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/resume.expected.md
@@ -19,10 +19,13 @@
2
+
+
+
@@ -59,10 +62,13 @@ container.querySelector("button").click()
2
+
+
+
@@ -99,10 +105,13 @@ container.querySelector("button").click()
2
+
+
+
@@ -139,10 +148,13 @@ container.querySelector("button").click()
2
+
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/ssr.expected.md
index 694565203..5f21ee458 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-params/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Inc
+ Inc
# Render "End"
@@ -23,10 +23,13 @@
2
+
+
+
@@ -54,7 +57,10 @@ inserted #document/html0/body1/div2/div1/div1/#comment3
inserted #document/html0/body1/div2/div1/div1/#text4
inserted #document/html0/body1/div2/div1/div1/#comment5
inserted #document/html0/body1/div2/div1/#comment2
+inserted #document/html0/body1/div2/div1/#comment3
inserted #document/html0/body1/div2/#comment2
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/div2/#comment3
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/html.expected/template.js
index 4c86a4e9b..bfe589908 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/html.expected/template.js
@@ -13,11 +13,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
}), "__tests__/template.marko_1_renderer", _scope0_id)
});
_$.writeScope(_scope0_id, {
"count": count,
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/resume.expected.md
index 87155792f..4d133f7c6 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/resume.expected.md
@@ -9,7 +9,9 @@
+
+
@@ -37,7 +39,9 @@ container.querySelector("button").click()
+
+
@@ -64,7 +68,9 @@ container.querySelector("button").click()
+
+
@@ -91,7 +97,9 @@ container.querySelector("button").click()
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/ssr.expected.md
index a177208b0..fb5ffe3a0 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-custom-tag/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -13,7 +13,9 @@
+
+
@@ -32,6 +34,8 @@ inserted #document/html1/body1/button0/#text0
inserted #document/html1/body1/button0/#comment1
inserted #document/html1/body1/#comment1
inserted #document/html1/body1/#comment2
-inserted #document/html1/body1/script3
-inserted #document/html1/body1/script3/#text0
+inserted #document/html1/body1/#comment3
+inserted #document/html1/body1/#comment4
+inserted #document/html1/body1/script5
+inserted #document/html1/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/html.expected/template.js
index 5afb3710d..6848623a7 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/html.expected/template.js
@@ -12,6 +12,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
}), "__tests__/template.marko_1_renderer", _scope0_id));
_$.write(_$.markResumeControlEnd(_scope0_id, "#text/0"));
_$.writeScope(_scope0_id, {
@@ -19,5 +20,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0!": _$.writeExistingScope(_dynamicScope),
"#text/0(": _$.normalizeDynamicRenderer(false || Child)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/resume.expected.md
index ba1afa44d..2509e5007 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/resume.expected.md
@@ -10,8 +10,10 @@
+
+
@@ -42,8 +44,10 @@ container.querySelector("button").click()
+
+
@@ -71,8 +75,10 @@ container.querySelector("button").click()
+
+
@@ -100,8 +106,10 @@ container.querySelector("button").click()
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/ssr.expected.md
index 39c002c33..037857cdf 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-dynamic-tag/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -14,8 +14,10 @@
+
+
@@ -36,6 +38,8 @@ inserted #document/html2/body1/button0/#comment1
inserted #document/html2/body1/#comment1
inserted #document/html2/body1/#comment2
inserted #document/html2/body1/#comment3
-inserted #document/html2/body1/script4
-inserted #document/html2/body1/script4/#text0
+inserted #document/html2/body1/#comment4
+inserted #document/html2/body1/#comment5
+inserted #document/html2/body1/script6
+inserted #document/html2/body1/script6/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/html.expected/template.js
index 9c8b6e196..110a994d1 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/html.expected/template.js
@@ -11,10 +11,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"num": num,
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_scope1_.set(_index, _$.getScopeById(_scope1_id));
});
_$.writeScope(_scope0_id, {
"#text/0(": _scope1_.size ? _scope1_ : undefined
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/resume.expected.md
index b58bef977..8f2c1b135 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/resume.expected.md
@@ -7,50 +7,63 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
+
@@ -75,6 +88,7 @@ c => click(c, 2)
1
+
click(c, 2)
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
+
@@ -141,13 +167,13 @@ c => click(c, 2)
# Mutations
```
-#document/html0/body1/button2: attr(data-selected) null => ""
-#document/html0/body1/button2: attr(data-multiple) null => ""
-#document/html0/body1/button6: attr(data-multiple) null => ""
-#document/html0/body1/button10: attr(data-multiple) null => ""
-#document/html0/body1/button14: attr(data-multiple) null => ""
-#document/html0/body1/button18: attr(data-multiple) null => ""
-#document/html0/body1/button22: attr(data-multiple) null => ""
+#document/html0/body1/button3: attr(data-selected) null => ""
+#document/html0/body1/button3: attr(data-multiple) null => ""
+#document/html0/body1/button9: attr(data-multiple) null => ""
+#document/html0/body1/button15: attr(data-multiple) null => ""
+#document/html0/body1/button21: attr(data-multiple) null => ""
+#document/html0/body1/button27: attr(data-multiple) null => ""
+#document/html0/body1/button33: attr(data-multiple) null => ""
```
@@ -162,10 +188,12 @@ c => click(c, 3)
1
+
2
+
click(c, 3)
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
+
@@ -224,14 +263,14 @@ c => click(c, 3)
# Mutations
```
-#document/html0/body1/button2: attr(data-selected) "" => null
-#document/html0/body1/button2: attr(data-multiple) "" => null
-#document/html0/body1/button4: attr(data-selected) null => ""
-#document/html0/body1/button4: attr(data-multiple) null => ""
-#document/html0/body1/button6: attr(data-multiple) "" => null
-#document/html0/body1/button14: attr(data-multiple) "" => null
-#document/html0/body1/button16: attr(data-multiple) null => ""
-#document/html0/body1/button18: attr(data-multiple) "" => null
+#document/html0/body1/button3: attr(data-selected) "" => null
+#document/html0/body1/button3: attr(data-multiple) "" => null
+#document/html0/body1/button6: attr(data-selected) null => ""
+#document/html0/body1/button6: attr(data-multiple) null => ""
+#document/html0/body1/button9: attr(data-multiple) "" => null
+#document/html0/body1/button21: attr(data-multiple) "" => null
+#document/html0/body1/button24: attr(data-multiple) null => ""
+#document/html0/body1/button27: attr(data-multiple) "" => null
```
@@ -246,18 +285,22 @@ c => click(c, 5)
1
+
2
+
3
+
4
+
click(c, 5)
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
+
@@ -304,12 +356,12 @@ c => click(c, 5)
# Mutations
```
-#document/html0/body1/button4: attr(data-selected) "" => null
-#document/html0/body1/button4: attr(data-multiple) "" => null
-#document/html0/body1/button8: attr(data-selected) null => ""
-#document/html0/body1/button8: attr(data-multiple) null => ""
-#document/html0/body1/button10: attr(data-multiple) "" => null
-#document/html0/body1/button16: attr(data-multiple) "" => null
-#document/html0/body1/button18: attr(data-multiple) null => ""
-#document/html0/body1/button22: attr(data-multiple) "" => null
+#document/html0/body1/button6: attr(data-selected) "" => null
+#document/html0/body1/button6: attr(data-multiple) "" => null
+#document/html0/body1/button12: attr(data-selected) null => ""
+#document/html0/body1/button12: attr(data-multiple) null => ""
+#document/html0/body1/button15: attr(data-multiple) "" => null
+#document/html0/body1/button24: attr(data-multiple) "" => null
+#document/html0/body1/button27: attr(data-multiple) null => ""
+#document/html0/body1/button33: attr(data-multiple) "" => null
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/ssr.expected.md
index 0642ebe29..fc7500eb8 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-for/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1 2 3 4 5 6 7 8 9 10 11 12
+ 1 2 3 4 5 6 7 8 9 10 11 12
# Render "End"
@@ -11,50 +11,63 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
+
@@ -70,39 +83,52 @@ inserted #document/html0/body1
inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/button2
-inserted #document/html0/body1/button2/#text0
-inserted #document/html0/body1/#comment3
-inserted #document/html0/body1/button4
-inserted #document/html0/body1/button4/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/button3
+inserted #document/html0/body1/button3/#text0
+inserted #document/html0/body1/#comment4
inserted #document/html0/body1/#comment5
inserted #document/html0/body1/button6
inserted #document/html0/body1/button6/#text0
inserted #document/html0/body1/#comment7
-inserted #document/html0/body1/button8
-inserted #document/html0/body1/button8/#text0
-inserted #document/html0/body1/#comment9
-inserted #document/html0/body1/button10
-inserted #document/html0/body1/button10/#text0
+inserted #document/html0/body1/#comment8
+inserted #document/html0/body1/button9
+inserted #document/html0/body1/button9/#text0
+inserted #document/html0/body1/#comment10
inserted #document/html0/body1/#comment11
inserted #document/html0/body1/button12
inserted #document/html0/body1/button12/#text0
inserted #document/html0/body1/#comment13
-inserted #document/html0/body1/button14
-inserted #document/html0/body1/button14/#text0
-inserted #document/html0/body1/#comment15
-inserted #document/html0/body1/button16
-inserted #document/html0/body1/button16/#text0
+inserted #document/html0/body1/#comment14
+inserted #document/html0/body1/button15
+inserted #document/html0/body1/button15/#text0
+inserted #document/html0/body1/#comment16
inserted #document/html0/body1/#comment17
inserted #document/html0/body1/button18
inserted #document/html0/body1/button18/#text0
inserted #document/html0/body1/#comment19
-inserted #document/html0/body1/button20
-inserted #document/html0/body1/button20/#text0
-inserted #document/html0/body1/#comment21
-inserted #document/html0/body1/button22
-inserted #document/html0/body1/button22/#text0
+inserted #document/html0/body1/#comment20
+inserted #document/html0/body1/button21
+inserted #document/html0/body1/button21/#text0
+inserted #document/html0/body1/#comment22
inserted #document/html0/body1/#comment23
-inserted #document/html0/body1/script24
-inserted #document/html0/body1/script24/#text0
+inserted #document/html0/body1/button24
+inserted #document/html0/body1/button24/#text0
+inserted #document/html0/body1/#comment25
+inserted #document/html0/body1/#comment26
+inserted #document/html0/body1/button27
+inserted #document/html0/body1/button27/#text0
+inserted #document/html0/body1/#comment28
+inserted #document/html0/body1/#comment29
+inserted #document/html0/body1/button30
+inserted #document/html0/body1/button30/#text0
+inserted #document/html0/body1/#comment31
+inserted #document/html0/body1/#comment32
+inserted #document/html0/body1/button33
+inserted #document/html0/body1/button33/#text0
+inserted #document/html0/body1/#comment34
+inserted #document/html0/body1/#comment35
+inserted #document/html0/body1/#comment36
+inserted #document/html0/body1/script37
+inserted #document/html0/body1/script37/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/html.expected/template.js
index a785fb9a6..42260fe28 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/html.expected/template.js
@@ -11,6 +11,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
_ifScopeId = _scope1_id;
} else {
@@ -19,6 +20,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope2_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope2_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer");
_ifScopeId = _scope2_id;
}
@@ -28,5 +30,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0(": _ifRenderer,
"#text/0!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/resume.expected.md
index 0b5377fa5..8695128a1 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/resume.expected.md
@@ -9,8 +9,10 @@
+
+
@@ -37,8 +39,10 @@ container.querySelector("button").click()
+
+
@@ -65,8 +69,10 @@ container.querySelector("button").click()
+
+
@@ -92,8 +98,10 @@ container.querySelector("button").click()
The button was clicked 3 times.
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/ssr.expected.md
index ce7177951..e5ca1e315 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -13,8 +13,10 @@
+
+
@@ -33,6 +35,8 @@ inserted #document/html0/body1/div0/button0/#text0
inserted #document/html0/body1/div0/button0/#comment1
inserted #document/html0/body1/div0/#comment1
inserted #document/html0/body1/div0/#comment2
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/div0/#comment3
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/html.expected/template.js
index f1509bdbc..57dcf55f5 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/html.expected/template.js
@@ -21,5 +21,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"items": items,
"#text/0(": _scope1_.size ? _scope1_ : undefined
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/resume.expected.md
index a967c0758..10b3f8b2b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/resume.expected.md
@@ -18,6 +18,7 @@
+
@@ -53,6 +54,7 @@ container.querySelector("#add").click()
+
@@ -89,6 +91,7 @@ container.querySelector("#add").click()
+
@@ -124,6 +127,7 @@ container.querySelector("#remove").click()
+
@@ -159,6 +163,7 @@ container.querySelector("#add").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/ssr.expected.md
index be9fad812..7570491a5 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Add Remove
+ Add Remove
# Render "End"
@@ -22,6 +22,7 @@
+
@@ -42,6 +43,7 @@ inserted #document/html0/body1/div0/#comment2
inserted #document/html0/body1/div0/button3
inserted #document/html0/body1/div0/button3/#text0
inserted #document/html0/body1/div0/#comment4
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/html.expected/template.js
index 7d409a9a3..9100c3405 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/html.expected/template.js
@@ -24,5 +24,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"list": list,
"#ul/0(": _scope1_.size ? _scope1_ : undefined
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/resume.expected.md
index a9e5b42bd..3e2302d06 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/resume.expected.md
@@ -31,6 +31,7 @@
Reverse
+
@@ -81,6 +82,7 @@ container.querySelector("#toggle").click()
Reverse
+
@@ -129,6 +131,7 @@ container.querySelector("#toggle").click()
Reverse
+
@@ -177,6 +180,7 @@ container.querySelector("#reverse").click()
Reverse
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/ssr.expected.md
index eba8dad3b..7e5543fcd 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Toggle Reverse
+ Toggle Reverse
# Render "End"
@@ -35,6 +35,7 @@
Reverse
+
@@ -65,6 +66,7 @@ inserted #document/html0/body1/#comment3
inserted #document/html0/body1/button4
inserted #document/html0/body1/button4/#text0
inserted #document/html0/body1/#comment5
-inserted #document/html0/body1/script6
-inserted #document/html0/body1/script6/#text0
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/script7
+inserted #document/html0/body1/script7/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/html.expected/template.js
index 7ba3bbadc..b986bc7a8 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/html.expected/template.js
@@ -18,5 +18,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0(": _ifRenderer,
"#text/0!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/resume.expected.md
index 1c9d7f636..c97705632 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/resume.expected.md
@@ -11,6 +11,7 @@
+
@@ -38,6 +39,7 @@ container.querySelector("button").click()
+
@@ -67,6 +69,7 @@ container.querySelector("button").click()
+
@@ -95,6 +98,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/ssr.expected.md
index eabb0060b..ccfd219ae 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Hello!Toggle
+ Hello!Toggle
# Render "End"
@@ -15,6 +15,7 @@
+
@@ -33,6 +34,7 @@ inserted #document/html0/body1/div0/#comment1
inserted #document/html0/body1/div0/button2
inserted #document/html0/body1/div0/button2/#text0
inserted #document/html0/body1/div0/#comment3
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/html.expected/template.js
index f19dfe3c9..44ed17dec 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/html.expected/template.js
@@ -9,5 +9,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"clickCount": clickCount
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/resume.expected.md
index 6a3b7246d..d2e2a3a14 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/resume.expected.md
@@ -10,6 +10,7 @@
+
@@ -37,6 +38,7 @@ container.querySelector("button").click()
+
@@ -64,6 +66,7 @@ container.querySelector("button").click()
+
@@ -91,6 +94,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/ssr.expected.md
index be45fdc7f..0aa1b1882 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/basic-unused-ref/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -14,6 +14,7 @@
+
@@ -31,6 +32,7 @@ inserted #document/html0/body1/div0/button0
inserted #document/html0/body1/div0/button0/#text0
inserted #document/html0/body1/div0/button0/#comment1
inserted #document/html0/body1/div0/#comment1
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/html.expected/template.js
index eb41f7768..4accb9d41 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/html.expected/template.js
@@ -11,6 +11,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
_ifScopeId = _scope1_id;
}
@@ -22,5 +23,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/1(": _ifRenderer,
"#text/1!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/resume.expected.md
index 6d227be66..78ff1693f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/resume.expected.md
@@ -9,7 +9,9 @@
hi
+
+
@@ -33,6 +35,8 @@ container.querySelector("button").click()
+
+
@@ -42,7 +46,7 @@ container.querySelector("button").click()
# Mutations
```
-removed #document/html0/body1/#comment2 after span
+removed #document/html0/body1/#comment2 after #document/html0/body1/#comment3
inserted #document/html0/body1/#comment2
removed span after #document/html0/body1/#comment2
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/ssr.expected.md
index 6684eb87b..3aa267052 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- hi
+ hi
# Render "End"
@@ -13,7 +13,9 @@
hi
+
+
@@ -32,6 +34,8 @@ inserted #document/html0/body1/span2
inserted #document/html0/body1/span2/#text0
inserted #document/html0/body1/span2/#comment1
inserted #document/html0/body1/#comment3
-inserted #document/html0/body1/script4
-inserted #document/html0/body1/script4/#text0
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/#comment5
+inserted #document/html0/body1/script6
+inserted #document/html0/body1/script6/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/html.expected/template.js
index 6774f2c86..974a8b7ed 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/html.expected/template.js
@@ -9,5 +9,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"a": a,
"b": b
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/resume.expected.md
index 1e24175a0..c88971e8e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
+
@@ -33,6 +34,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/ssr.expected.md
index ce8d12312..220dc09bb 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/batched-updates/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -12,6 +12,7 @@
+
@@ -28,6 +29,7 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/html.expected/template.js
index 204fdf78e..3f4ca6776 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/html.expected/template.js
@@ -15,11 +15,13 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
}), "__tests__/template.marko_1_renderer", _scope0_id)
});
_$.writeScope(_scope0_id, {
"clickCount": clickCount,
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/resume.expected.md
index a4a800188..35ad3e281 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/resume.expected.md
@@ -7,9 +7,11 @@
0
+
+
@@ -34,9 +36,11 @@ container.querySelector("button").click()
1
+
+
@@ -61,9 +65,11 @@ container.querySelector("button").click()
2
+
+
@@ -88,9 +94,11 @@ container.querySelector("button").click()
3
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/ssr.expected.md
index d4bdd4ca7..55bdd7b0f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/body-content/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -11,9 +11,11 @@
0
+
+
@@ -31,7 +33,9 @@ inserted #document/html0/body1/button0/#comment0
inserted #document/html0/body1/button0/#text1
inserted #document/html0/body1/button0/#comment2
inserted #document/html0/body1/button0/#comment3
+inserted #document/html0/body1/button0/#comment4
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/tags/child.js
index 5159beda5..c51ceb861 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/tags/child.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/tags/child.js
@@ -5,11 +5,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
name,
write
} = input;
- _$.write(`${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}
${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/1")} ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/2")}
${_$.markResumeCleanup(_scope0_id)}`);
+ _$.write(`${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}
${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/1")} ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/2")}
`);
_$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_name_write");
_$.writeScope(_scope0_id, {
"name": name,
"write": write
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/template.js
index cf1b09aba..e84c4d354 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/html.expected/template.js
@@ -21,6 +21,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope1_id);
_scope1_.set(_index, _$.getScopeById(_scope1_id));
});
_$.write(_$.markResumeControlEnd(_scope0_id, "#text/2"));
@@ -30,5 +31,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"write": write,
"#text/2(": _scope1_.size ? _scope1_ : undefined
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/resume.expected.md
index 64556a773..5157a6704 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/resume.expected.md
@@ -28,6 +28,7 @@ mounted 3
+
2
@@ -42,6 +43,7 @@ mounted 3
+
3
@@ -56,7 +58,9 @@ mounted 3
+
+
@@ -107,6 +111,7 @@ destroyed 3
+
2
@@ -121,8 +126,11 @@ destroyed 3
+
+
+
@@ -134,10 +142,10 @@ destroyed 3
```
removed #text in #document/html0/body1/div2
inserted #document/html0/body1/div2/#text0
-removed #comment after #document/html0/body1/#comment13
-removed div after #document/html0/body1/#comment13
-removed span after #document/html0/body1/#comment13
-removed p after #document/html0/body1/#comment13
+removed #comment after #document/html0/body1/#comment15
+removed div after #document/html0/body1/#comment15
+removed span after #document/html0/body1/#comment15
+removed p after #document/html0/body1/#comment15
```
@@ -175,9 +183,13 @@ destroyed 2
+
+
+
+
@@ -189,10 +201,10 @@ destroyed 2
```
removed #text in #document/html0/body1/div2
inserted #document/html0/body1/div2/#text0
-removed #comment after #document/html0/body1/#comment8
-removed div after #document/html0/body1/#comment8
-removed span after #document/html0/body1/#comment8
-removed p after #document/html0/body1/#comment8
+removed #comment after #document/html0/body1/#comment9
+removed div after #document/html0/body1/#comment9
+removed span after #document/html0/body1/#comment9
+removed p after #document/html0/body1/#comment9
```
@@ -219,8 +231,12 @@ destroyed 1
+
+
+
+
@@ -230,7 +246,7 @@ destroyed 1
# Mutations
```
-removed #document/html0/body1/#comment4 after #document/html0/body1/#comment7
+removed #document/html0/body1/#comment4 after #document/html0/body1/#comment10
inserted #document/html0/body1/#comment4
removed #text in #document/html0/body1/div2
inserted #document/html0/body1/div2/#text0
@@ -293,8 +309,12 @@ mounted 3
3
+
+
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/ssr.expected.md
index 393accbae..2ac876509 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
Toggle
1
1 1
2
2 2
3
3 3
+
Toggle
1
1 1
2
2 2
3
3 3
# Render "End"
@@ -27,6 +27,7 @@
+
2
@@ -41,6 +42,7 @@
+
3
@@ -55,7 +57,9 @@
+
+
@@ -85,28 +89,32 @@ inserted #document/html0/body1/p7/#text0
inserted #document/html0/body1/p7/#comment1
inserted #document/html0/body1/#comment8
inserted #document/html0/body1/#comment9
-inserted #document/html0/body1/div10
-inserted #document/html0/body1/div10/#text0
-inserted #document/html0/body1/div10/#comment1
-inserted #document/html0/body1/span11
-inserted #document/html0/body1/span11/#text0
-inserted #document/html0/body1/span11/#comment1
-inserted #document/html0/body1/p12
-inserted #document/html0/body1/p12/#text0
-inserted #document/html0/body1/p12/#comment1
-inserted #document/html0/body1/#comment13
+inserted #document/html0/body1/#comment10
+inserted #document/html0/body1/div11
+inserted #document/html0/body1/div11/#text0
+inserted #document/html0/body1/div11/#comment1
+inserted #document/html0/body1/span12
+inserted #document/html0/body1/span12/#text0
+inserted #document/html0/body1/span12/#comment1
+inserted #document/html0/body1/p13
+inserted #document/html0/body1/p13/#text0
+inserted #document/html0/body1/p13/#comment1
inserted #document/html0/body1/#comment14
-inserted #document/html0/body1/div15
-inserted #document/html0/body1/div15/#text0
-inserted #document/html0/body1/div15/#comment1
-inserted #document/html0/body1/span16
-inserted #document/html0/body1/span16/#text0
-inserted #document/html0/body1/span16/#comment1
-inserted #document/html0/body1/p17
-inserted #document/html0/body1/p17/#text0
-inserted #document/html0/body1/p17/#comment1
-inserted #document/html0/body1/#comment18
-inserted #document/html0/body1/#comment19
-inserted #document/html0/body1/script20
-inserted #document/html0/body1/script20/#text0
+inserted #document/html0/body1/#comment15
+inserted #document/html0/body1/#comment16
+inserted #document/html0/body1/div17
+inserted #document/html0/body1/div17/#text0
+inserted #document/html0/body1/div17/#comment1
+inserted #document/html0/body1/span18
+inserted #document/html0/body1/span18/#text0
+inserted #document/html0/body1/span18/#comment1
+inserted #document/html0/body1/p19
+inserted #document/html0/body1/p19/#text0
+inserted #document/html0/body1/p19/#comment1
+inserted #document/html0/body1/#comment20
+inserted #document/html0/body1/#comment21
+inserted #document/html0/body1/#comment22
+inserted #document/html0/body1/#comment23
+inserted #document/html0/body1/script24
+inserted #document/html0/body1/script24/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/tags/child.js
index 81850f80e..37da0b2fb 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/tags/child.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/tags/child.js
@@ -5,11 +5,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
name,
write
} = input;
- _$.write(`
${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")} a
${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/1")} a ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/2")} a
${_$.markResumeCleanup(_scope0_id)}`);
+ _$.write(`
${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")} a
${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/1")} a ${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/2")} a
`);
_$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_name_write");
_$.writeScope(_scope0_id, {
"name": name,
"write": write
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/template.js
index 24b8eb0f9..054515575 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/html.expected/template.js
@@ -40,6 +40,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope3_id, {
"#childScope/0": _$.writeExistingScope(_childScope3)
});
+ _$.markResumeCleanup(_scope3_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_3_renderer");
_ifScopeId = _scope3_id;
}
@@ -51,6 +52,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/1!": _$.getScopeById(_ifScopeId),
"_": _$.ensureScopeWithId(_scope1_id)
});
+ _$.markResumeCleanup(_scope2_id);
_$.register(_ifRenderer2 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer");
_ifScopeId2 = _scope2_id;
}
@@ -61,6 +63,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/1(": _ifRenderer2,
"#text/1!": _$.getScopeById(_ifScopeId2)
});
+ _$.markResumeCleanup(_scope1_id);
_$.register(_ifRenderer3 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
_ifScopeId3 = _scope1_id;
}
@@ -76,5 +79,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/4(": _ifRenderer3,
"#text/4!": _$.getScopeById(_ifScopeId3)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/resume.expected.md
index a10a29f89..025e969c3 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/resume.expected.md
@@ -79,11 +79,15 @@ Inner mounted
a
+
+
+
+
@@ -170,10 +174,14 @@ Inner destroyed
+
+
+
+
@@ -183,7 +191,7 @@ Inner destroyed
# Mutations
```
-removed #document/html0/body1/div8/div4/#comment4 after #document/html0/body1/div8/div4/#comment5
+removed #document/html0/body1/div8/div4/#comment4 after #document/html0/body1/div8/div4/#comment6
inserted #document/html0/body1/div8/div4/#comment4
removed #text in #document/html0/body1/pre6
inserted #document/html0/body1/pre6/#text0
@@ -246,8 +254,11 @@ Middle destroyed
+
+
+
@@ -257,7 +268,7 @@ Middle destroyed
# Mutations
```
-removed #document/html0/body1/div8/#comment4 after div
+removed #document/html0/body1/div8/#comment4 after #document/html0/body1/div8/#comment5
inserted #document/html0/body1/div8/#comment4
removed #text in #document/html0/body1/pre6
inserted #document/html0/body1/pre6/#text0
@@ -301,6 +312,8 @@ Outer destroyed
+
+
@@ -310,7 +323,7 @@ Outer destroyed
# Mutations
```
-removed #document/html0/body1/#comment8 after div
+removed #document/html0/body1/#comment8 after #document/html0/body1/#comment9
inserted #document/html0/body1/#comment8
removed #text in #document/html0/body1/pre6
inserted #document/html0/body1/pre6/#text0
@@ -354,6 +367,8 @@ Outer destroyed
+
+
@@ -403,6 +418,8 @@ Outer destroyed
+
+
@@ -485,6 +502,8 @@ Inner mounted
+
+
@@ -553,6 +572,8 @@ Inner destroyed
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/ssr.expected.md
index 26319f34e..bf2198be0 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Toggle Outer Toggle Middle Toggle Inner Outer a
Outer a Outer a
Middle a
Middle a Middle a
Inner a
Inner a Inner a
+ Toggle Outer Toggle Middle Toggle Inner Outer a
Outer a Outer a
Middle a
Middle a Middle a
Inner a
Inner a Inner a
# Render "End"
@@ -78,11 +78,15 @@
a
+
+
+
+
@@ -149,8 +153,12 @@ inserted #document/html0/body1/div8/div4/p7/#comment1
inserted #document/html0/body1/div8/div4/p7/#text2
inserted #document/html0/body1/div8/div4/#comment8
inserted #document/html0/body1/div8/div4/#comment9
+inserted #document/html0/body1/div8/div4/#comment10
inserted #document/html0/body1/div8/#comment5
+inserted #document/html0/body1/div8/#comment6
inserted #document/html0/body1/#comment9
-inserted #document/html0/body1/script10
-inserted #document/html0/body1/script10/#text0
+inserted #document/html0/body1/#comment10
+inserted #document/html0/body1/#comment11
+inserted #document/html0/body1/script12
+inserted #document/html0/body1/script12/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/html.expected/template.js
index 42eb5a20a..d4c09d173 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/html.expected/template.js
@@ -7,11 +7,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
let _ifScopeId, _ifRenderer;
if (show) {
const _scope1_id = _$.nextScopeId();
- _$.write(`${_$.markResumeScopeStart(_scope1_id)}a
b c
${_$.markResumeCleanup(_scope1_id)}`);
+ _$.write(`${_$.markResumeScopeStart(_scope1_id)}a
b c
`);
_$.writeEffect(_scope1_id, "__tests__/template.marko_1");
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
_ifScopeId = _scope1_id;
}
@@ -22,5 +23,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/2(": _ifRenderer,
"#text/2!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/resume.expected.md
index b8f007fe0..ef451b496 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/resume.expected.md
@@ -24,6 +24,7 @@ mounted
+
@@ -56,6 +57,7 @@ destroyed
+
@@ -104,6 +106,7 @@ mounted
c
+
@@ -143,6 +146,7 @@ destroyed
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/ssr.expected.md
index 26238b930..8820167e7 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Toggle a
b c
+ Toggle a
b c
# Render "End"
@@ -25,6 +25,7 @@
+
@@ -51,6 +52,7 @@ inserted #document/html0/body1/p7
inserted #document/html0/body1/p7/#text0
inserted #document/html0/body1/#comment8
inserted #document/html0/body1/#comment9
-inserted #document/html0/body1/script10
-inserted #document/html0/body1/script10/#text0
+inserted #document/html0/body1/#comment10
+inserted #document/html0/body1/script11
+inserted #document/html0/body1/script11/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/tags/child.js
index 177c72c51..21fa6c60b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/tags/child.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/tags/child.js
@@ -1,10 +1,11 @@
import * as _$ from "@marko/runtime-tags/debug/html";
const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
const _scope0_id = _$.nextScopeId();
- _$.write(`a
b c
${_$.markResumeCleanup(_scope0_id)}`);
+ _$.write("a
b c
");
_$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_input");
_$.writeScope(_scope0_id, {
"input": input
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/template.js
index 990dc45c8..9e1b78839 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/html.expected/template.js
@@ -29,5 +29,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/2(": _ifRenderer,
"#text/2!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/resume.expected.md
index f36ae887f..2a30471ab 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/resume.expected.md
@@ -23,6 +23,7 @@
+
@@ -53,6 +54,7 @@ container.querySelector("button").click()
+
@@ -98,6 +100,7 @@ container.querySelector("button").click()
c
+
@@ -133,6 +136,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/ssr.expected.md
index a4b186201..8ec8422cc 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Toggle
a
b c
+ Toggle
a
b c
# Render "End"
@@ -25,6 +25,7 @@
+
@@ -51,6 +52,7 @@ inserted #document/html0/body1/p7
inserted #document/html0/body1/p7/#text0
inserted #document/html0/body1/#comment8
inserted #document/html0/body1/#comment9
-inserted #document/html0/body1/script10
-inserted #document/html0/body1/script10/#text0
+inserted #document/html0/body1/#comment10
+inserted #document/html0/body1/script11
+inserted #document/html0/body1/script11/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/tags/child.js
index 25c008434..4c78790f3 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/tags/child.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/tags/child.js
@@ -5,11 +5,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
name,
write
} = input;
- _$.write(`${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}
${_$.markResumeCleanup(_scope0_id)}`);
+ _$.write(`${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}
`);
_$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_name_write");
_$.writeScope(_scope0_id, {
"name": name,
"write": write
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/template.js
index 6719da63a..cce75c9aa 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/html.expected/template.js
@@ -34,6 +34,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#childScope/0": _$.writeExistingScope(_childScope2),
"_": _$.ensureScopeWithId(_scope1_id)
});
+ _$.markResumeCleanup(_scope2_id);
_scope2_.set(_index, _$.getScopeById(_scope2_id));
});
_forScopeIds2.push(_scope1_id);
@@ -44,6 +45,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/1(": _scope2_.size ? _scope2_ : undefined,
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_scope1_.set(_index2, _$.getScopeById(_scope1_id));
});
_$.write(_$.markResumeControlSingleNodeEnd(_scope0_id, "#text/2", _forScopeIds2));
@@ -53,5 +55,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"write": write,
"#text/2(": _scope1_.size ? _scope1_ : undefined
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/resume.expected.md
index 49c619f95..d195adabf 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/resume.expected.md
@@ -22,6 +22,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -144,6 +157,7 @@ destroyed 2.3
+
1.2
@@ -151,8 +165,11 @@ destroyed 2.3
+
+
+
2
@@ -166,6 +183,7 @@ destroyed 2.3
+
2.2
@@ -173,9 +191,14 @@ destroyed 2.3
+
+
+
+
+
@@ -192,11 +215,11 @@ removed #text in #document/html0/body1/div2
inserted #text
removed #text in #document/html0/body1/div2
inserted #text
-removed div after #document/html0/body1/div5
+removed div after #document/html0/body1/#comment7
removed #text in #document/html0/body1/div2
inserted #text
-removed div after #document/html0/body1/div4/div3
+removed div after #document/html0/body1/div4/#comment5
removed #text in #document/html0/body1/div2
inserted #document/html0/body1/div2/#text0
-removed div after #document/html0/body1/div5/div3
+removed div after #document/html0/body1/div6/#comment5
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/ssr.expected.md
index eaa44416a..3df846c52 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Toggle
+ Toggle
# Render "End"
@@ -26,6 +26,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -128,38 +141,21 @@ inserted #document/html0/body1/div4/div2/div0
inserted #document/html0/body1/div4/div2/div0/#text0
inserted #document/html0/body1/div4/div2/div0/#comment1
inserted #document/html0/body1/div4/div2/#comment1
-inserted #document/html0/body1/div4/div3
-inserted #document/html0/body1/div4/div3/div0
-inserted #document/html0/body1/div4/div3/div0/#text0
-inserted #document/html0/body1/div4/div3/div0/#comment1
-inserted #document/html0/body1/div4/div3/#comment1
+inserted #document/html0/body1/div4/#comment3
inserted #document/html0/body1/div4/div4
inserted #document/html0/body1/div4/div4/div0
inserted #document/html0/body1/div4/div4/div0/#text0
inserted #document/html0/body1/div4/div4/div0/#comment1
inserted #document/html0/body1/div4/div4/#comment1
inserted #document/html0/body1/div4/#comment5
-inserted #document/html0/body1/div5
-inserted #document/html0/body1/div5/div0
-inserted #document/html0/body1/div5/div0/#text0
-inserted #document/html0/body1/div5/div0/#comment1
-inserted #document/html0/body1/div5/#comment1
-inserted #document/html0/body1/div5/div2
-inserted #document/html0/body1/div5/div2/div0
-inserted #document/html0/body1/div5/div2/div0/#text0
-inserted #document/html0/body1/div5/div2/div0/#comment1
-inserted #document/html0/body1/div5/div2/#comment1
-inserted #document/html0/body1/div5/div3
-inserted #document/html0/body1/div5/div3/div0
-inserted #document/html0/body1/div5/div3/div0/#text0
-inserted #document/html0/body1/div5/div3/div0/#comment1
-inserted #document/html0/body1/div5/div3/#comment1
-inserted #document/html0/body1/div5/div4
-inserted #document/html0/body1/div5/div4/div0
-inserted #document/html0/body1/div5/div4/div0/#text0
-inserted #document/html0/body1/div5/div4/div0/#comment1
-inserted #document/html0/body1/div5/div4/#comment1
-inserted #document/html0/body1/div5/#comment5
+inserted #document/html0/body1/div4/div6
+inserted #document/html0/body1/div4/div6/div0
+inserted #document/html0/body1/div4/div6/div0/#text0
+inserted #document/html0/body1/div4/div6/div0/#comment1
+inserted #document/html0/body1/div4/div6/#comment1
+inserted #document/html0/body1/div4/#comment7
+inserted #document/html0/body1/div4/#comment8
+inserted #document/html0/body1/#comment5
inserted #document/html0/body1/div6
inserted #document/html0/body1/div6/div0
inserted #document/html0/body1/div6/div0/#text0
@@ -170,18 +166,48 @@ inserted #document/html0/body1/div6/div2/div0
inserted #document/html0/body1/div6/div2/div0/#text0
inserted #document/html0/body1/div6/div2/div0/#comment1
inserted #document/html0/body1/div6/div2/#comment1
-inserted #document/html0/body1/div6/div3
-inserted #document/html0/body1/div6/div3/div0
-inserted #document/html0/body1/div6/div3/div0/#text0
-inserted #document/html0/body1/div6/div3/div0/#comment1
-inserted #document/html0/body1/div6/div3/#comment1
+inserted #document/html0/body1/div6/#comment3
inserted #document/html0/body1/div6/div4
inserted #document/html0/body1/div6/div4/div0
inserted #document/html0/body1/div6/div4/div0/#text0
inserted #document/html0/body1/div6/div4/div0/#comment1
inserted #document/html0/body1/div6/div4/#comment1
inserted #document/html0/body1/div6/#comment5
+inserted #document/html0/body1/div6/div6
+inserted #document/html0/body1/div6/div6/div0
+inserted #document/html0/body1/div6/div6/div0/#text0
+inserted #document/html0/body1/div6/div6/div0/#comment1
+inserted #document/html0/body1/div6/div6/#comment1
+inserted #document/html0/body1/div6/#comment7
+inserted #document/html0/body1/div6/#comment8
inserted #document/html0/body1/#comment7
-inserted #document/html0/body1/script8
-inserted #document/html0/body1/script8/#text0
+inserted #document/html0/body1/div8
+inserted #document/html0/body1/div8/div0
+inserted #document/html0/body1/div8/div0/#text0
+inserted #document/html0/body1/div8/div0/#comment1
+inserted #document/html0/body1/div8/#comment1
+inserted #document/html0/body1/div8/div2
+inserted #document/html0/body1/div8/div2/div0
+inserted #document/html0/body1/div8/div2/div0/#text0
+inserted #document/html0/body1/div8/div2/div0/#comment1
+inserted #document/html0/body1/div8/div2/#comment1
+inserted #document/html0/body1/div8/#comment3
+inserted #document/html0/body1/div8/div4
+inserted #document/html0/body1/div8/div4/div0
+inserted #document/html0/body1/div8/div4/div0/#text0
+inserted #document/html0/body1/div8/div4/div0/#comment1
+inserted #document/html0/body1/div8/div4/#comment1
+inserted #document/html0/body1/div8/#comment5
+inserted #document/html0/body1/div8/div6
+inserted #document/html0/body1/div8/div6/div0
+inserted #document/html0/body1/div8/div6/div0/#text0
+inserted #document/html0/body1/div8/div6/div0/#comment1
+inserted #document/html0/body1/div8/div6/#comment1
+inserted #document/html0/body1/div8/#comment7
+inserted #document/html0/body1/div8/#comment8
+inserted #document/html0/body1/#comment9
+inserted #document/html0/body1/#comment10
+inserted #document/html0/body1/#comment11
+inserted #document/html0/body1/script12
+inserted #document/html0/body1/script12/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/tags/child.js
index 25c008434..4c78790f3 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/tags/child.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/tags/child.js
@@ -5,11 +5,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
name,
write
} = input;
- _$.write(`${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}
${_$.markResumeCleanup(_scope0_id)}`);
+ _$.write(`${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}
`);
_$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_name_write");
_$.writeScope(_scope0_id, {
"name": name,
"write": write
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/template.js
index 8d8906660..359f5d3fb 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/html.expected/template.js
@@ -21,6 +21,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope1_id);
_scope1_.set(_index, _$.getScopeById(_scope1_id));
});
_$.write(_$.markResumeControlSingleNodeEnd(_scope0_id, "#text/2", _forScopeIds));
@@ -30,5 +31,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"write": write,
"#text/2(": _scope1_.size ? _scope1_ : undefined
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/resume.expected.md
index 23547f860..904e5649a 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/resume.expected.md
@@ -19,17 +19,21 @@ mounted 3
+
2
+
3
+
+
@@ -71,13 +75,17 @@ destroyed 3
+
2
+
+
+
@@ -89,7 +97,7 @@ destroyed 3
```
removed #text in #document/html0/body1/div2
inserted #document/html0/body1/div2/#text0
-removed div after #document/html0/body1/#comment7
+removed div after #document/html0/body1/#comment9
```
@@ -118,9 +126,13 @@ destroyed 2
+
+
+
+
@@ -132,7 +144,7 @@ destroyed 2
```
removed #text in #document/html0/body1/div2
inserted #document/html0/body1/div2/#text0
-removed div after #document/html0/body1/#comment5
+removed div after #document/html0/body1/#comment6
```
@@ -159,8 +171,12 @@ destroyed 1
+
+
+
+
@@ -170,7 +186,7 @@ destroyed 1
# Mutations
```
-removed #document/html0/body1/#comment4 after #document/html0/body1/#comment7
+removed #document/html0/body1/#comment4 after #document/html0/body1/#comment10
inserted #document/html0/body1/#comment4
removed #text in #document/html0/body1/div2
inserted #document/html0/body1/div2/#text0
@@ -212,8 +228,12 @@ mounted 3
3
+
+
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/ssr.expected.md
index 50e772d4d..480983eb2 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Toggle
1
2
3
+ Toggle
1
2
3
# Render "End"
@@ -18,17 +18,21 @@
+
2
+
3
+
+
@@ -50,15 +54,19 @@ inserted #document/html0/body1/div4
inserted #document/html0/body1/div4/#text0
inserted #document/html0/body1/div4/#comment1
inserted #document/html0/body1/#comment5
-inserted #document/html0/body1/div6
-inserted #document/html0/body1/div6/#text0
-inserted #document/html0/body1/div6/#comment1
-inserted #document/html0/body1/#comment7
-inserted #document/html0/body1/div8
-inserted #document/html0/body1/div8/#text0
-inserted #document/html0/body1/div8/#comment1
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/div7
+inserted #document/html0/body1/div7/#text0
+inserted #document/html0/body1/div7/#comment1
+inserted #document/html0/body1/#comment8
inserted #document/html0/body1/#comment9
-inserted #document/html0/body1/#comment10
-inserted #document/html0/body1/script11
-inserted #document/html0/body1/script11/#text0
+inserted #document/html0/body1/div10
+inserted #document/html0/body1/div10/#text0
+inserted #document/html0/body1/div10/#comment1
+inserted #document/html0/body1/#comment11
+inserted #document/html0/body1/#comment12
+inserted #document/html0/body1/#comment13
+inserted #document/html0/body1/#comment14
+inserted #document/html0/body1/script15
+inserted #document/html0/body1/script15/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/tags/child.js
index fee020dca..0aefe396f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/tags/child.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/tags/child.js
@@ -5,11 +5,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
name,
write
} = input;
- _$.write(`${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}
${_$.markResumeCleanup(_scope0_id)}`);
+ _$.write(`${_$.escapeXML(name)}${_$.markResumeNode(_scope0_id, "#text/0")}
`);
_$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_name_write");
_$.writeScope(_scope0_id, {
"name": name,
"write": write
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/template.js
index fc6d5da19..19284f4b2 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/html.expected/template.js
@@ -39,6 +39,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope3_id, {
"#childScope/0": _$.writeExistingScope(_childScope3)
});
+ _$.markResumeCleanup(_scope3_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_3_renderer");
_ifScopeId = _scope3_id;
}
@@ -50,6 +51,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/1!": _$.getScopeById(_ifScopeId),
"_": _$.ensureScopeWithId(_scope1_id)
});
+ _$.markResumeCleanup(_scope2_id);
_$.register(_ifRenderer2 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer");
_ifScopeId2 = _scope2_id;
}
@@ -60,6 +62,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/1(": _ifRenderer2,
"#text/1!": _$.getScopeById(_ifScopeId2)
});
+ _$.markResumeCleanup(_scope1_id);
_$.register(_ifRenderer3 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
_ifScopeId3 = _scope1_id;
}
@@ -75,5 +78,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/4(": _ifRenderer3,
"#text/4!": _$.getScopeById(_ifScopeId3)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/resume.expected.md
index 2a1f0b622..e98d0253c 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/resume.expected.md
@@ -45,11 +45,15 @@ Inner mounted
+
+
+
+
@@ -114,10 +118,14 @@ Inner destroyed
+
+
+
+
@@ -127,7 +135,7 @@ Inner destroyed
# Mutations
```
-removed #document/html0/body1/div8/div2/#comment2 after #document/html0/body1/div8/div2/#comment3
+removed #document/html0/body1/div8/div2/#comment2 after #document/html0/body1/div8/div2/#comment4
inserted #document/html0/body1/div8/div2/#comment2
removed #text in #document/html0/body1/pre6
inserted #document/html0/body1/pre6/#text0
@@ -176,8 +184,11 @@ Middle destroyed
+
+
+
@@ -187,7 +198,7 @@ Middle destroyed
# Mutations
```
-removed #document/html0/body1/div8/#comment2 after div
+removed #document/html0/body1/div8/#comment2 after #document/html0/body1/div8/#comment3
inserted #document/html0/body1/div8/#comment2
removed #text in #document/html0/body1/pre6
inserted #document/html0/body1/pre6/#text0
@@ -231,6 +242,8 @@ Outer destroyed
+
+
@@ -240,7 +253,7 @@ Outer destroyed
# Mutations
```
-removed #document/html0/body1/#comment8 after div
+removed #document/html0/body1/#comment8 after #document/html0/body1/#comment9
inserted #document/html0/body1/#comment8
removed #text in #document/html0/body1/pre6
inserted #document/html0/body1/pre6/#text0
@@ -284,6 +297,8 @@ Outer destroyed
+
+
@@ -333,6 +348,8 @@ Outer destroyed
+
+
@@ -397,6 +414,8 @@ Inner mounted
+
+
@@ -463,6 +482,8 @@ Inner destroyed
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/ssr.expected.md
index f56bf0877..fdf3df84f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Toggle Outer Toggle Middle Toggle Inner
+ Toggle Outer Toggle Middle Toggle Inner
# Render "End"
@@ -44,11 +44,15 @@
+
+
+
+
@@ -87,8 +91,12 @@ inserted #document/html0/body1/div8/div2/p2/#text0
inserted #document/html0/body1/div8/div2/p2/#comment1
inserted #document/html0/body1/div8/div2/#comment3
inserted #document/html0/body1/div8/div2/#comment4
+inserted #document/html0/body1/div8/div2/#comment5
inserted #document/html0/body1/div8/#comment3
+inserted #document/html0/body1/div8/#comment4
inserted #document/html0/body1/#comment9
-inserted #document/html0/body1/script10
-inserted #document/html0/body1/script10/#text0
+inserted #document/html0/body1/#comment10
+inserted #document/html0/body1/#comment11
+inserted #document/html0/body1/script12
+inserted #document/html0/body1/script12/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/html.expected/template.js
index dde9df891..f8afde62d 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/html.expected/template.js
@@ -7,11 +7,12 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
let _ifScopeId, _ifRenderer;
if (show) {
const _scope1_id = _$.nextScopeId();
- _$.write(`child
${_$.markResumeCleanup(_scope1_id)}`);
+ _$.write("child
");
_$.writeEffect(_scope1_id, "__tests__/template.marko_1");
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
_ifScopeId = _scope1_id;
}
@@ -22,5 +23,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/2(": _ifRenderer,
"#text/2!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/resume.expected.md
index 802c42d70..713613b5b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/resume.expected.md
@@ -17,6 +17,7 @@ mounted
+
@@ -49,6 +50,7 @@ destroyed
+
@@ -88,6 +90,7 @@ mounted
child
+
@@ -125,6 +128,7 @@ destroyed
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/ssr.expected.md
index 451fbdf7e..42bda1122 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Toggle child
+ Toggle child
# Render "End"
@@ -18,6 +18,7 @@
+
@@ -39,6 +40,7 @@ inserted #document/html0/body1/div4
inserted #document/html0/body1/div4/#text0
inserted #document/html0/body1/#comment5
inserted #document/html0/body1/#comment6
-inserted #document/html0/body1/script7
-inserted #document/html0/body1/script7/#text0
+inserted #document/html0/body1/#comment7
+inserted #document/html0/body1/script8
+inserted #document/html0/body1/script8/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/tags/child.js
index 204f4c802..67e2acb6c 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/tags/child.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/tags/child.js
@@ -1,10 +1,11 @@
import * as _$ from "@marko/runtime-tags/debug/html";
const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
const _scope0_id = _$.nextScopeId();
- _$.write(`child
${_$.markResumeCleanup(_scope0_id)}`);
+ _$.write("child
");
_$.writeEffect(_scope0_id, "__tests__/tags/child.marko_0_input");
_$.writeScope(_scope0_id, {
"input": input
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/template.js
index 9502746f8..081ac7212 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/html.expected/template.js
@@ -28,5 +28,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/2(": _ifRenderer,
"#text/2!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/resume.expected.md
index e57695959..7b36c7889 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/resume.expected.md
@@ -16,6 +16,7 @@
+
@@ -46,6 +47,7 @@ container.querySelector("button").click()
+
@@ -82,6 +84,7 @@ container.querySelector("button").click()
child
+
@@ -115,6 +118,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/ssr.expected.md
index 6b5354822..3f811c502 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Toggle
child
+ Toggle
child
# Render "End"
@@ -18,6 +18,7 @@
+
@@ -39,6 +40,7 @@ inserted #document/html0/body1/div4
inserted #document/html0/body1/div4/#text0
inserted #document/html0/body1/#comment5
inserted #document/html0/body1/#comment6
-inserted #document/html0/body1/script7
-inserted #document/html0/body1/script7/#text0
+inserted #document/html0/body1/#comment7
+inserted #document/html0/body1/script8
+inserted #document/html0/body1/script8/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/html.expected/tags/counter.js
index 0732e8c08..37a51b595 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/html.expected/tags/counter.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/html.expected/tags/counter.js
@@ -8,5 +8,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"input": input,
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/counter.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/ssr.expected.md
index 0e15742fa..44e37defe 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-import-value/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- $0.00
+ $0.00
# Render "End"
@@ -12,6 +12,7 @@
+
@@ -28,6 +29,7 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/tags/display-intersection.js b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/tags/display-intersection.js
index a402dc093..7a6aae2f3 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/tags/display-intersection.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/tags/display-intersection.js
@@ -10,5 +10,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"value": value,
"dummy": dummy
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/display-intersection.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/template.js
index c9e2ea3a4..4ffc881af 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/html.expected/template.js
@@ -13,5 +13,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"count": count,
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/resume.expected.md
index 0aba2df1c..20a8099fd 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/resume.expected.md
@@ -7,8 +7,10 @@
0
+
+
@@ -33,8 +35,10 @@ container.querySelector("button").click()
1
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/ssr.expected.md
index fec05480b..d00b08ac6 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-intersection/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -11,8 +11,10 @@
0
+
+
@@ -28,8 +30,10 @@ inserted #document/html0/body1
inserted #document/html0/body1/div0
inserted #document/html0/body1/div0/#text0
inserted #document/html0/body1/div0/#comment1
-inserted #document/html0/body1/button1
-inserted #document/html0/body1/#comment2
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/button2
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/script5
+inserted #document/html0/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/html.expected/tags/counter.js
index 0732e8c08..37a51b595 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/html.expected/tags/counter.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/html.expected/tags/counter.js
@@ -8,5 +8,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"input": input,
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/counter.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/resume.expected.md
index 4bc290dbf..cd7057ff0 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/resume.expected.md
@@ -8,11 +8,13 @@
+
$0.00
+
@@ -38,11 +40,13 @@ container.querySelectorAll("button").forEach(button => button.click())
+
$1.00
+
@@ -53,5 +57,5 @@ container.querySelectorAll("button").forEach(button => button.click())
# Mutations
```
#document/html0/body1/button0/#text0: "$0.00" => "$1.00"
-#document/html0/body1/button2/#text0: "$0.00" => "$1.00"
+#document/html0/body1/button3/#text0: "$0.00" => "$1.00"
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/ssr.expected.md
index 1935c433b..203ebac9a 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/component-attrs-static-code/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- $0.00 $0.00
+ $0.00 $0.00
# Render "End"
@@ -12,11 +12,13 @@
+
$0.00
+
@@ -33,10 +35,12 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/button2
-inserted #document/html0/body1/button2/#text0
-inserted #document/html0/body1/button2/#comment1
-inserted #document/html0/body1/#comment3
-inserted #document/html0/body1/script4
-inserted #document/html0/body1/script4/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/button3
+inserted #document/html0/body1/button3/#text0
+inserted #document/html0/body1/button3/#comment1
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/#comment5
+inserted #document/html0/body1/script6
+inserted #document/html0/body1/script6/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/const-tag-destructure/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/const-tag-destructure/__snapshots__/html.expected/template.js
index 076e4c0ad..c8d99908a 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/const-tag-destructure/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/const-tag-destructure/__snapshots__/html.expected/template.js
@@ -10,5 +10,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
y
} = z;
_$.write(`${_$.escapeXML(x)}${_$.markResumeNode(_scope0_id, "#text/0")}
${_$.escapeXML(y)}${_$.markResumeNode(_scope0_id, "#text/1")}`);
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/const-tag-destructure/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/const-tag-destructure/__snapshots__/resume.expected.md
index f86c39c6c..3a08b23f8 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/const-tag-destructure/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/const-tag-destructure/__snapshots__/resume.expected.md
@@ -9,6 +9,7 @@
2
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/const-tag-destructure/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/const-tag-destructure/__snapshots__/ssr.expected.md
index 9d66aca03..e8423eddd 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/const-tag-destructure/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/const-tag-destructure/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1
2
+ 1
2
# Render "End"
@@ -13,6 +13,7 @@
2
+
@@ -30,6 +31,7 @@ inserted #document/html0/body1/div0/#text0
inserted #document/html0/body1/div0/#comment1
inserted #document/html0/body1/#text1
inserted #document/html0/body1/#comment2
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/html.expected/template.js
index b30ce3857..52eda15de 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/html.expected/template.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/resume.expected.md
index e3a0b6cd1..892728492 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/resume.expected.md
@@ -11,6 +11,7 @@
false
+
@@ -40,6 +41,7 @@ container.querySelector("input").click()
true
+
@@ -68,6 +70,7 @@ container.querySelector("input").click()
false
+
@@ -97,6 +100,7 @@ container.querySelector("input").click()
true
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/ssr.expected.md
index 8adc10848..aacb6b238 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- false
+ false
# Render "End"
@@ -15,6 +15,7 @@
false
+
@@ -32,6 +33,7 @@ inserted #document/html0/body1/#comment1
inserted #document/html0/body1/span2
inserted #document/html0/body1/span2/#text0
inserted #document/html0/body1/span2/#comment1
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/html.expected/template.js
index 14e9ebcf8..611125f45 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/html.expected/template.js
@@ -13,5 +13,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"checkedValue": checkedValue
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/resume.expected.md
index 5ce43c98d..029144a91 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/resume.expected.md
@@ -23,6 +23,7 @@
a
+
@@ -63,6 +64,7 @@ container.querySelectorAll(`input`)[1].click()
b
+
@@ -103,6 +105,7 @@ container.querySelectorAll(`input`)[2].click()
c
+
@@ -143,6 +146,7 @@ container.querySelectorAll(`input`)[0].click()
a
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/ssr.expected.md
index 96e66a60a..edc431e4b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-value/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- a
+ a
# Render "End"
@@ -27,6 +27,7 @@
a
+
@@ -48,6 +49,7 @@ inserted #document/html0/body1/#comment5
inserted #document/html0/body1/span6
inserted #document/html0/body1/span6/#text0
inserted #document/html0/body1/span6/#comment1
-inserted #document/html0/body1/script7
-inserted #document/html0/body1/script7/#text0
+inserted #document/html0/body1/#comment7
+inserted #document/html0/body1/script8
+inserted #document/html0/body1/script8/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/html.expected/template.js
index bbb7cd9db..7948ef634 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/html.expected/template.js
@@ -33,5 +33,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#childScope/1": _$.writeExistingScope(_childScope2),
"#childScope/2": _$.writeExistingScope(_childScope3)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/resume.expected.md
index 3537f02d4..90b093b2f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/resume.expected.md
@@ -24,6 +24,7 @@
a,b
+
@@ -64,6 +65,7 @@ container.querySelector("input").click()
b
+
@@ -105,6 +107,7 @@ container.querySelector("input").click()
b,a
+
@@ -145,6 +148,7 @@ container.querySelector("input").click()
b
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/ssr.expected.md
index 2c9d0e8e1..853dfc534 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- a,b
+ a,b
# Render "End"
@@ -28,6 +28,7 @@
a,b
+
@@ -49,6 +50,7 @@ inserted #document/html0/body1/#comment5
inserted #document/html0/body1/span6
inserted #document/html0/body1/span6/#text0
inserted #document/html0/body1/span6/#comment1
-inserted #document/html0/body1/script7
-inserted #document/html0/body1/script7/#text0
+inserted #document/html0/body1/#comment7
+inserted #document/html0/body1/script8
+inserted #document/html0/body1/script8/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/html.expected/template.js
index 218fcaa59..b4f40505b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/html.expected/template.js
@@ -13,5 +13,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"checkedValue": checkedValue
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/resume.expected.md
index 56da193e9..e55808162 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/resume.expected.md
@@ -24,6 +24,7 @@
a,b
+
@@ -64,6 +65,7 @@ container.querySelectorAll(`input`)[1].click()
a
+
@@ -105,6 +107,7 @@ container.querySelectorAll(`input`)[2].click()
a,c
+
@@ -145,6 +148,7 @@ container.querySelectorAll(`input`)[0].click()
c
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/ssr.expected.md
index 40915fecf..51b4ede09 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked-values/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- a,b
+ a,b
# Render "End"
@@ -28,6 +28,7 @@
a,b
+
@@ -49,6 +50,7 @@ inserted #document/html0/body1/#comment5
inserted #document/html0/body1/span6
inserted #document/html0/body1/span6/#text0
inserted #document/html0/body1/span6/#comment1
-inserted #document/html0/body1/script7
-inserted #document/html0/body1/script7/#text0
+inserted #document/html0/body1/#comment7
+inserted #document/html0/body1/script8
+inserted #document/html0/body1/script8/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/html.expected/template.js
index c20ad0ad0..1c275a096 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/html.expected/template.js
@@ -9,5 +9,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"checked": checked
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/resume.expected.md
index c148ea4b1..c9c157412 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/resume.expected.md
@@ -11,6 +11,7 @@
false
+
@@ -40,6 +41,7 @@ container.querySelector("input").click()
true
+
@@ -68,6 +70,7 @@ container.querySelector("input").click()
false
+
@@ -97,6 +100,7 @@ container.querySelector("input").click()
true
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/ssr.expected.md
index 3ee6ba046..605ae10b8 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-checked/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- false
+ false
# Render "End"
@@ -15,6 +15,7 @@
false
+
@@ -32,6 +33,7 @@ inserted #document/html0/body1/#comment1
inserted #document/html0/body1/span2
inserted #document/html0/body1/span2/#text0
inserted #document/html0/body1/span2/#comment1
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/html.expected/template.js
index 2566fa9c7..941320b90 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/html.expected/template.js
@@ -9,5 +9,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"value": value
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/resume.expected.md
index 876aad1b0..fc88e8b72 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/resume.expected.md
@@ -12,6 +12,7 @@
hello
+
@@ -46,6 +47,7 @@ input.dispatchEvent(new window.Event("input", {
w
+
@@ -80,6 +82,7 @@ input.dispatchEvent(new window.Event("input", {
wor
+
@@ -114,6 +117,7 @@ input.dispatchEvent(new window.Event("input", {
world
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/ssr.expected.md
index d2d3fa7d5..62e66f7dd 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-input-value/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- hello
+ hello
# Render "End"
@@ -16,6 +16,7 @@
hello
+
@@ -33,6 +34,7 @@ inserted #document/html0/body1/#comment1
inserted #document/html0/body1/span2
inserted #document/html0/body1/span2/#text0
inserted #document/html0/body1/span2/#comment1
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/html.expected/template.js
index 0fde83a48..4777ffb8e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/html.expected/template.js
@@ -26,5 +26,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0!": _$.writeExistingScope(_dynamicScope),
"#text/0(": _$.normalizeDynamicRenderer(tag ? "select" : {})
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/resume.expected.md
index 71d68953b..c81d52e0b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/resume.expected.md
@@ -30,6 +30,7 @@
b
+
@@ -83,6 +84,7 @@ bubbles: true
b
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/ssr.expected.md
index 3e1a484f8..38bde2661 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- A B C b
+ A B C b
# Render "End"
@@ -34,6 +34,7 @@
b
+
@@ -61,6 +62,7 @@ inserted #document/html1/body1/#comment1
inserted #document/html1/body1/span2
inserted #document/html1/body1/span2/#text0
inserted #document/html1/body1/span2/#comment1
-inserted #document/html1/body1/script3
-inserted #document/html1/body1/script3/#text0
+inserted #document/html1/body1/#comment3
+inserted #document/html1/body1/script4
+inserted #document/html1/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/html.expected/template.js
index 0269cdc45..00a404377 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/html.expected/template.js
@@ -12,5 +12,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"value": value
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/resume.expected.md
index 25e54c4cf..0fbb29bdf 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/resume.expected.md
@@ -26,6 +26,7 @@
b
+
@@ -74,6 +75,7 @@ bubbles: true
c
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/ssr.expected.md
index d5a46e91a..2d46402fe 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-select/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- A B C b
+ A B C b
# Render "End"
@@ -30,6 +30,7 @@
b
+
@@ -53,6 +54,7 @@ inserted #document/html0/body1/#comment1
inserted #document/html0/body1/span2
inserted #document/html0/body1/span2/#text0
inserted #document/html0/body1/span2/#comment1
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/html.expected/template.js
index c9f4519a1..986a65ad6 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/html.expected/template.js
@@ -9,5 +9,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"value": value
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/resume.expected.md
index 42e80e80a..3a352b100 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/resume.expected.md
@@ -11,6 +11,7 @@
hello
+
@@ -44,6 +45,7 @@ textarea.dispatchEvent(new window.Event("input", {
w
+
@@ -77,6 +79,7 @@ textarea.dispatchEvent(new window.Event("input", {
wor
+
@@ -110,6 +113,7 @@ textarea.dispatchEvent(new window.Event("input", {
world
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/ssr.expected.md
index fa132ab49..724f09a96 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- hello
+ hello
# Render "End"
@@ -15,6 +15,7 @@
hello
+
@@ -33,6 +34,7 @@ inserted #document/html0/body1/#comment1
inserted #document/html0/body1/span2
inserted #document/html0/body1/span2/#text0
inserted #document/html0/body1/span2/#comment1
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/html.expected/template.js
index f02842246..6f0aae9ec 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/html.expected/template.js
@@ -9,5 +9,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"a": a,
"b": b
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/resume.expected.md
index c2ad755a6..5aceaaea6 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/resume.expected.md
@@ -24,6 +24,7 @@
0
+
@@ -65,6 +66,7 @@ container.querySelector("button.a").click()
10
+
@@ -107,6 +109,7 @@ container.querySelector("button.b").click()
15
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/ssr.expected.md
index 1a4c95836..a2c816894 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/counter-intersection/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 + 0 = 0
+ 0 + 0 = 0
# Render "End"
@@ -28,6 +28,7 @@
0
+
@@ -54,6 +55,7 @@ inserted #document/html0/body1/div0/#text5
inserted #document/html0/body1/div0/#comment6
inserted #document/html0/body1/div0/#text7
inserted #document/html0/body1/div0/#comment8
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/html.expected/template.js
index 0b84b756d..a19174b9b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/html.expected/template.js
@@ -15,5 +15,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#childScope/0": _$.writeExistingScope(_childScope),
"#childScope/1": _$.writeExistingScope(_childScope2)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/resume.expected.md
index a2ce89ef1..60d10b559 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/resume.expected.md
@@ -11,6 +11,7 @@
y
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/ssr.expected.md
index 3fa781f46..d7822e204 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-default-value/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 3 y
+ 3 y
# Render "End"
@@ -15,6 +15,7 @@
y
+
@@ -35,6 +36,7 @@ inserted #document/html1/body1/#comment3
inserted #document/html1/body1/#text4
inserted #document/html1/body1/#comment5
inserted #document/html1/body1/#text6
-inserted #document/html1/body1/script7
-inserted #document/html1/body1/script7/#text0
+inserted #document/html1/body1/#comment7
+inserted #document/html1/body1/script8
+inserted #document/html1/body1/script8/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/tags/custom-tag.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/tags/custom-tag.js
index 8576efa08..26d886454 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/tags/custom-tag.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/tags/custom-tag.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/3!": _$.writeExistingScope(_dynamicScope),
"#text/3(": _$.normalizeDynamicRenderer(input.content)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/resume.expected.md
index 9f38b6257..aea3ccdec 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/resume.expected.md
@@ -26,6 +26,7 @@
+
@@ -69,6 +70,7 @@ container.querySelector("button").click()
+
@@ -115,6 +117,7 @@ container.querySelector("button").click()
+
@@ -161,6 +164,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/ssr.expected.md
index 1362a5e01..564922b99 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1,10 Counts: 1,10
+ 1,10 Counts: 1,10
# Render "End"
@@ -30,6 +30,7 @@
+
@@ -61,6 +62,7 @@ inserted #document/html0/body1/div3/#comment5
inserted #document/html0/body1/div3/#text6
inserted #document/html0/body1/div3/#comment7
inserted #document/html0/body1/#comment4
-inserted #document/html0/body1/script5
-inserted #document/html0/body1/script5/#text0
+inserted #document/html0/body1/#comment5
+inserted #document/html0/body1/script6
+inserted #document/html0/body1/script6/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/html.expected/tags/custom-tag.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/html.expected/tags/custom-tag.js
index f51427e89..7a9b78950 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/html.expected/tags/custom-tag.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/html.expected/tags/custom-tag.js
@@ -16,5 +16,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/2!": _$.writeExistingScope(_dynamicScope),
"#text/2(": _$.normalizeDynamicRenderer(input.content)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/resume.expected.md
index 756d785ec..ec241ea8d 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/resume.expected.md
@@ -22,6 +22,7 @@
+
@@ -61,6 +62,7 @@ container.querySelector("button").click()
+
@@ -101,6 +103,7 @@ container.querySelector("button").click()
+
@@ -141,6 +144,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/ssr.expected.md
index d83776b94..a610ffc26 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1 Count (hello): 1
+ 1 Count (hello): 1
# Render "End"
@@ -26,6 +26,7 @@
+
@@ -53,6 +54,7 @@ inserted #document/html0/body1/div3/#comment5
inserted #document/html0/body1/div3/#text6
inserted #document/html0/body1/div3/#comment7
inserted #document/html0/body1/#comment4
-inserted #document/html0/body1/script5
-inserted #document/html0/body1/script5/#text0
+inserted #document/html0/body1/#comment5
+inserted #document/html0/body1/script6
+inserted #document/html0/body1/script6/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/html.expected/tags/custom-tag.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/html.expected/tags/custom-tag.js
index 2bc3a78b5..1b57f44af 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/html.expected/tags/custom-tag.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/html.expected/tags/custom-tag.js
@@ -12,5 +12,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/2!": _$.writeExistingScope(_dynamicScope),
"#text/2(": _$.normalizeDynamicRenderer(input.content)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/custom-tag.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/resume.expected.md
index 075d6bd53..a084e8f8c 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/resume.expected.md
@@ -18,6 +18,7 @@
+
@@ -53,6 +54,7 @@ container.querySelector("button").click()
+
@@ -89,6 +91,7 @@ container.querySelector("button").click()
+
@@ -125,6 +128,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/ssr.expected.md
index 327f70c5e..005f3e8b5 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1 Count: 1
+ 1 Count: 1
# Render "End"
@@ -22,6 +22,7 @@
+
@@ -45,6 +46,7 @@ inserted #document/html0/body1/div3/#comment1
inserted #document/html0/body1/div3/#text2
inserted #document/html0/body1/div3/#comment3
inserted #document/html0/body1/#comment4
-inserted #document/html0/body1/script5
-inserted #document/html0/body1/script5/#text0
+inserted #document/html0/body1/#comment5
+inserted #document/html0/body1/script6
+inserted #document/html0/body1/script6/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/html.expected/tags/counter.js
index 5358f193d..f1cc9d315 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/html.expected/tags/counter.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/html.expected/tags/counter.js
@@ -12,6 +12,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
x = _new_x;
}, "__tests__/tags/counter.marko_0/valueChange", _scope0_id)
});
+ _$.markResumeCleanup(_scope0_id);
return _return;
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/counter.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/resume.expected.md
index 61ad41557..630e64ab9 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/resume.expected.md
@@ -10,6 +10,7 @@
+
@@ -50,6 +51,7 @@ container.querySelector("button.inc-child").click()
+
@@ -73,7 +75,7 @@ container.querySelector("button.inc-child").click()
# Mutations
```
#document/html0/body1/button0/#text0: "1" => "2"
-#document/html0/body1/button2/#text0: "1" => "2"
+#document/html0/body1/button3/#text0: "1" => "2"
```
@@ -91,6 +93,7 @@ container.querySelector("button.inc-parent").click()
+
@@ -114,7 +117,7 @@ container.querySelector("button.inc-parent").click()
# Mutations
```
#document/html0/body1/button0/#text0: "2" => "3"
-#document/html0/body1/button2/#text0: "2" => "3"
+#document/html0/body1/button3/#text0: "2" => "3"
```
@@ -132,6 +135,7 @@ container.querySelector("button.reset").click()
+
@@ -155,5 +159,5 @@ container.querySelector("button.reset").click()
# Mutations
```
#document/html0/body1/button0/#text0: "3" => "0"
-#document/html0/body1/button2/#text0: "3" => "0"
+#document/html0/body1/button3/#text0: "3" => "0"
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/ssr.expected.md
index 164c43d9a..51b628b7c 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-assignment/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1 1 reset
+ 1 1 reset
# Render "End"
@@ -14,6 +14,7 @@
+
@@ -43,13 +44,14 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/button2
-inserted #document/html0/body1/button2/#text0
-inserted #document/html0/body1/button2/#comment1
-inserted #document/html0/body1/#comment3
-inserted #document/html0/body1/button4
-inserted #document/html0/body1/button4/#text0
-inserted #document/html0/body1/#comment5
-inserted #document/html0/body1/script6
-inserted #document/html0/body1/script6/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/button3
+inserted #document/html0/body1/button3/#text0
+inserted #document/html0/body1/button3/#comment1
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/button5
+inserted #document/html0/body1/button5/#text0
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/script7
+inserted #document/html0/body1/script7/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/html.expected/tags/child.js
index 3af3ae132..12b947330 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/html.expected/tags/child.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/html.expected/tags/child.js
@@ -7,6 +7,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"/": _tagVar
});
+ _$.markResumeCleanup(_scope0_id);
return _return;
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/resume.expected.md
index 20e59a1e9..4b730b964 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/resume.expected.md
@@ -6,6 +6,7 @@
child
+
4
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/ssr.expected.md
index d30aa9cef..5147bf43b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-expression/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
child 4
+
child 4
# Render "End"
@@ -10,6 +10,7 @@
child
+
4
@@ -28,9 +29,10 @@ inserted #document/html0/head0
inserted #document/html0/body1
inserted #document/html0/body1/span0
inserted #document/html0/body1/span0/#text0
-inserted #document/html0/body1/div1
-inserted #document/html0/body1/div1/#text0
-inserted #document/html0/body1/div1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/div2
+inserted #document/html0/body1/div2/#text0
+inserted #document/html0/body1/div2/#comment1
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/html.expected/tags/child.js
index e330a2712..aeea13543 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/html.expected/tags/child.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/html.expected/tags/child.js
@@ -10,6 +10,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"y": y,
"/": _tagVar
});
+ _$.markResumeCleanup(_scope0_id);
return _return;
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/resume.expected.md
index 1f0e78693..0581b1c26 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/resume.expected.md
@@ -6,6 +6,7 @@
child
+
3
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/ssr.expected.md
index 5f5f86086..5157d2ab4 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var-multiple/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
child 3
+
child 3
# Render "End"
@@ -10,6 +10,7 @@
child
+
3
@@ -28,9 +29,10 @@ inserted #document/html0/head0
inserted #document/html0/body1
inserted #document/html0/body1/span0
inserted #document/html0/body1/span0/#text0
-inserted #document/html0/body1/div1
-inserted #document/html0/body1/div1/#text0
-inserted #document/html0/body1/div1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/div2
+inserted #document/html0/body1/div2/#text0
+inserted #document/html0/body1/div2/#comment1
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/html.expected/tags/child.js
index 8d22ad28a..de2ea09c9 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/html.expected/tags/child.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/html.expected/tags/child.js
@@ -9,6 +9,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"x": x,
"/": _tagVar
});
+ _$.markResumeCleanup(_scope0_id);
return _return;
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/resume.expected.md
index 199d531bf..d44b9427b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/resume.expected.md
@@ -10,6 +10,7 @@
+
1
@@ -41,6 +42,7 @@ container.querySelector("button.inc").click()
+
2
@@ -55,7 +57,7 @@ container.querySelector("button.inc").click()
# Mutations
```
#document/html0/body1/button0/#text0: "1" => "2"
-#document/html0/body1/div2/#text0: "1" => "2"
+#document/html0/body1/div3/#text0: "1" => "2"
```
@@ -73,6 +75,7 @@ container.querySelector("button.inc").click()
+
3
@@ -87,7 +90,7 @@ container.querySelector("button.inc").click()
# Mutations
```
#document/html0/body1/button0/#text0: "2" => "3"
-#document/html0/body1/div2/#text0: "2" => "3"
+#document/html0/body1/div3/#text0: "2" => "3"
```
@@ -105,6 +108,7 @@ container.querySelector("button.inc").click()
+
4
@@ -119,5 +123,5 @@ container.querySelector("button.inc").click()
# Mutations
```
#document/html0/body1/button0/#text0: "3" => "4"
-#document/html0/body1/div2/#text0: "3" => "4"
+#document/html0/body1/div3/#text0: "3" => "4"
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/ssr.expected.md
index c80de9d66..e488a5bb6 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/custom-tag-var/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
1 1
+
1 1
# Render "End"
@@ -14,6 +14,7 @@
+
1
@@ -34,9 +35,10 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/div2
-inserted #document/html0/body1/div2/#text0
-inserted #document/html0/body1/div2/#comment1
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/div3
+inserted #document/html0/body1/div3/#text0
+inserted #document/html0/body1/div3/#comment1
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/debug-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/debug-tag/__snapshots__/html.expected/template.js
index 6d8c55f3a..092b2434c 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/debug-tag/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/debug-tag/__snapshots__/html.expected/template.js
@@ -6,5 +6,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
debugger;
const y = 0;
debugger;
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/html.expected/template.js
index 77919dd6c..93fc3f0c6 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/html.expected/template.js
@@ -20,5 +20,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"selected": selected,
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/resume.expected.md
index b5a9cd759..08a78a34c 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/resume.expected.md
@@ -15,6 +15,7 @@
Toggle
+
@@ -49,6 +50,7 @@ container.querySelector("button").click()
Toggle
+
@@ -81,6 +83,7 @@ container.querySelector("button").click()
Toggle
+
@@ -115,6 +118,7 @@ container.querySelector("button").click()
Toggle
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/ssr.expected.md
index 0155d90c5..7a6584a77 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
The thing
Toggle
+
The thing
Toggle
# Render "End"
@@ -19,6 +19,7 @@
Toggle
+
@@ -40,6 +41,7 @@ inserted #document/html0/body1/#comment1
inserted #document/html0/body1/button2
inserted #document/html0/body1/button2/#text0
inserted #document/html0/body1/#comment3
-inserted #document/html0/body1/script4
-inserted #document/html0/body1/script4/#text0
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/script5
+inserted #document/html0/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/html.expected/template.js
index 9b843a5d3..555340b69 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/html.expected/template.js
@@ -11,5 +11,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"x": x
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/resume.expected.md
index 39769256e..3a0c62ce3 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/resume.expected.md
@@ -12,6 +12,7 @@
+
@@ -41,6 +42,7 @@ container.querySelector("button").click()
+
@@ -71,6 +73,7 @@ container.querySelector("button").click()
+
@@ -101,6 +104,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/ssr.expected.md
index 48ed7da9e..0fd7f10f3 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-object/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
{"foo":1,"bar":2}
1
+
{"foo":1,"bar":2}
1
# Render "End"
@@ -16,6 +16,7 @@
+
@@ -35,6 +36,7 @@ inserted #document/html0/body1/button1
inserted #document/html0/body1/button1/#text0
inserted #document/html0/body1/button1/#comment1
inserted #document/html0/body1/#comment2
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-args/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-args/__snapshots__/html.expected/template.js
index 03bc3d97e..cdb772a9a 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-args/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-args/__snapshots__/html.expected/template.js
@@ -17,5 +17,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0!": _$.writeExistingScope(_dynamicScope),
"#text/0(": _$.normalizeDynamicRenderer(MyTag)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-args/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-args/__snapshots__/ssr.expected.md
index 548f8fe98..8d19f4eea 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-args/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-args/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
1|Hello|1
1
+
1|Hello|1
1
# Render "End"
@@ -26,6 +26,7 @@
+
@@ -55,6 +56,7 @@ inserted #document/html1/body1/button2
inserted #document/html1/body1/button2/#text0
inserted #document/html1/body1/button2/#comment1
inserted #document/html1/body1/#comment3
-inserted #document/html1/body1/script4
-inserted #document/html1/body1/script4/#text0
+inserted #document/html1/body1/#comment4
+inserted #document/html1/body1/script5
+inserted #document/html1/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-attr-signal/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-attr-signal/__snapshots__/html.expected/template.js
index a5d5bfa91..c260a0dd5 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-attr-signal/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-attr-signal/__snapshots__/html.expected/template.js
@@ -21,5 +21,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0!": _$.writeExistingScope(_dynamicScope),
"#text/0(": _$.normalizeDynamicRenderer(MyTag)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-attr-signal/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-attr-signal/__snapshots__/ssr.expected.md
index cdf9ba8af..c998f4881 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-attr-signal/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-attr-signal/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
1
1
+
1
1
# Render "End"
@@ -18,6 +18,7 @@
+
@@ -39,6 +40,7 @@ inserted #document/html1/body1/button2
inserted #document/html1/body1/button2/#text0
inserted #document/html1/body1/button2/#comment1
inserted #document/html1/body1/#comment3
-inserted #document/html1/body1/script4
-inserted #document/html1/body1/script4/#text0
+inserted #document/html1/body1/#comment4
+inserted #document/html1/body1/script5
+inserted #document/html1/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/__snapshots__/html.expected/template.js
index 82522d156..12fb6109e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/__snapshots__/html.expected/template.js
@@ -10,6 +10,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
}), "__tests__/template.marko_1_renderer", _scope0_id)
};
const _dynamicScope = _$.peekNextScope();
@@ -21,5 +22,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0!": _$.writeExistingScope(_dynamicScope),
"#text/0(": _$.normalizeDynamicRenderer(MyTag)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/__snapshots__/ssr.expected.md
index 3e8eed896..732dfe96b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
1
1
+
1
1
# Render "End"
@@ -12,12 +12,14 @@
1
+
1
+
@@ -35,10 +37,12 @@ inserted #document/html1/body1/div0
inserted #document/html1/body1/div0/#text0
inserted #document/html1/body1/div0/#comment1
inserted #document/html1/body1/#comment1
-inserted #document/html1/body1/button2
-inserted #document/html1/body1/button2/#text0
-inserted #document/html1/body1/button2/#comment1
-inserted #document/html1/body1/#comment3
-inserted #document/html1/body1/script4
-inserted #document/html1/body1/script4/#text0
+inserted #document/html1/body1/#comment2
+inserted #document/html1/body1/button3
+inserted #document/html1/body1/button3/#text0
+inserted #document/html1/body1/button3/#comment1
+inserted #document/html1/body1/#comment4
+inserted #document/html1/body1/#comment5
+inserted #document/html1/body1/script6
+inserted #document/html1/body1/script6/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render/__snapshots__/html.expected/template.js
index 8c8a4b71a..ee583ace5 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render/__snapshots__/html.expected/template.js
@@ -12,6 +12,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"y": y
});
+ _$.markResumeCleanup(_scope1_id);
}), "__tests__/template.marko_1_renderer", _scope0_id)
};
const _dynamicScope = _$.peekNextScope();
diff --git a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render/__snapshots__/resume.expected.md
index 213a86edb..26a394321 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/define-tag-render/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/define-tag-render/__snapshots__/resume.expected.md
@@ -19,6 +19,7 @@
+
+
Hello Ryan 1
1
# Render "End"
@@ -23,6 +23,7 @@
+
@@ -46,6 +47,7 @@ container.querySelector("button").click()
+
@@ -82,6 +84,7 @@ container.querySelector("button").click()
+
@@ -115,6 +118,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dollar-global-client/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dollar-global-client/__snapshots__/ssr.expected.md
index 9bac16e1a..e75b1c251 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dollar-global-client/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dollar-global-client/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
1 Toggle
+
1 Toggle
# Render "End"
@@ -20,6 +20,7 @@
+
@@ -40,6 +41,7 @@ inserted #document/html0/body1/div0/#comment2
inserted #document/html0/body1/div0/button3
inserted #document/html0/body1/div0/button3/#text0
inserted #document/html0/body1/div0/#comment4
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/html.expected/template.js
index 554bd5ded..01e5e64cd 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/html.expected/template.js
@@ -15,6 +15,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
}), "__tests__/template.marko_1_renderer", _scope0_id)
});
_$.write("
");
@@ -27,6 +28,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope3_id, {
"_": _$.ensureScopeWithId(_scope2_id)
});
+ _$.markResumeCleanup(_scope3_id);
}
_$.writeScope(_scope2_id, {
"_": _$.ensureScopeWithId(_scope0_id)
@@ -39,5 +41,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"c": c,
"#childScope/1": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/resume.expected.md
index 1213adfed..452a1d166 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/resume.expected.md
@@ -11,6 +11,7 @@
3
+
@@ -18,7 +19,9 @@
3
+
+
@@ -47,6 +50,7 @@ container.querySelector("button").click()
4
+
@@ -54,7 +58,9 @@ container.querySelector("button").click()
4
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/ssr.expected.md
index d6636923e..8591c7219 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-closures/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
1 2 3
1 2 3
+
1 2 3
1 2 3
# Render "End"
@@ -15,6 +15,7 @@
3
+
@@ -22,7 +23,9 @@
3
+
+
@@ -44,11 +47,14 @@ inserted #document/html0/body1/div2/#comment2
inserted #document/html0/body1/div2/#text3
inserted #document/html0/body1/div2/#comment4
inserted #document/html0/body1/div2/#comment5
+inserted #document/html0/body1/div2/#comment6
inserted #document/html0/body1/div3
inserted #document/html0/body1/div3/#text0
inserted #document/html0/body1/div3/#comment1
inserted #document/html0/body1/div3/#text2
inserted #document/html0/body1/div3/#comment3
-inserted #document/html0/body1/script4
-inserted #document/html0/body1/script4/#text0
+inserted #document/html0/body1/div3/#comment4
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/script5
+inserted #document/html0/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/html.expected/template.js
index 084eef5f8..dd33f2bb1 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/html.expected/template.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"clickCount": clickCount
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/resume.expected.md
index 0de22c579..1ac80f6e2 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
+
@@ -33,6 +34,7 @@ container.querySelector("button").click()
+
@@ -58,6 +60,7 @@ container.querySelector("button").click()
+
@@ -83,6 +86,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/ssr.expected.md
index 90f93fbb9..636061911 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-event-handlers/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
0
+
0
# Render "End"
@@ -12,6 +12,7 @@
+
@@ -28,6 +29,7 @@ inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/html.expected/template.js
index fcfa7a011..0cb216b21 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/html.expected/template.js
@@ -18,5 +18,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0!": _$.writeExistingScope(_dynamicScope),
"#text/0(": _$.normalizeDynamicRenderer(tagName)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/resume.expected.md
index 55bca3ea4..cfb401b42 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/resume.expected.md
@@ -12,6 +12,7 @@
+
@@ -41,6 +42,7 @@ container.querySelector("button").click()
+
@@ -73,6 +75,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/ssr.expected.md
index 028f5f427..632dd4ede 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
body content
+
body content
# Render "End"
@@ -16,6 +16,7 @@
+
@@ -34,6 +35,7 @@ inserted #document/html1/body1/span0/#text0
inserted #document/html1/body1/#comment1
inserted #document/html1/body1/button2
inserted #document/html1/body1/#comment3
-inserted #document/html1/body1/script4
-inserted #document/html1/body1/script4/#text0
+inserted #document/html1/body1/#comment4
+inserted #document/html1/body1/script5
+inserted #document/html1/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/html.expected/template.js
index 12577ffdb..29c5271fc 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/html.expected/template.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/2!": _$.writeExistingScope(_dynamicScope),
"#text/2(": _$.normalizeDynamicRenderer(tags[0])
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/resume.expected.md
index 7a3b8658f..d8decedbe 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/resume.expected.md
@@ -24,6 +24,7 @@
1
+
@@ -65,6 +66,7 @@ container.querySelector("button").click()
2
+
@@ -108,6 +110,7 @@ container.querySelector("button").click()
3
+
@@ -151,6 +154,7 @@ container.querySelector("button").click()
4
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/ssr.expected.md
index 4a3de1f90..0359e4c20 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Count: 1 Child: 1
Parent: 1
+ Count: 1 Child: 1
Parent: 1
# Render "End"
@@ -28,6 +28,7 @@
1
+
@@ -58,6 +59,7 @@ inserted #document/html0/body1/div5/#text0
inserted #document/html0/body1/div5/#comment1
inserted #document/html0/body1/div5/#text2
inserted #document/html0/body1/div5/#comment3
-inserted #document/html0/body1/script6
-inserted #document/html0/body1/script6/#text0
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/script7
+inserted #document/html0/body1/script7/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/html.expected/template.js
index 25dc438d9..c43c30e3a 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/html.expected/template.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/2!": _$.writeExistingScope(_dynamicScope),
"#text/2(": _$.normalizeDynamicRenderer(tags[0])
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/resume.expected.md
index 3be9f0c6a..7c0b22207 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/resume.expected.md
@@ -16,6 +16,7 @@
+
@@ -49,6 +50,7 @@ container.querySelector("button").click()
+
@@ -83,6 +85,7 @@ container.querySelector("button").click()
+
@@ -117,6 +120,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/ssr.expected.md
index 4eee8d418..629ea5a28 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Count: 1 1
+ Count: 1 1
# Render "End"
@@ -20,6 +20,7 @@
+
@@ -43,6 +44,7 @@ inserted #document/html0/body1/div3
inserted #document/html0/body1/div3/#text0
inserted #document/html0/body1/div3/#comment1
inserted #document/html0/body1/#comment4
-inserted #document/html0/body1/script5
-inserted #document/html0/body1/script5/#text0
+inserted #document/html0/body1/#comment5
+inserted #document/html0/body1/script6
+inserted #document/html0/body1/script6/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/html.expected/template.js
index 36e1ffba3..def7da881 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/html.expected/template.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"className": className
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/resume.expected.md
index a25b9d53f..23099d035 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/resume.expected.md
@@ -11,6 +11,7 @@
+
@@ -39,6 +40,7 @@ container.querySelector("button").click()
+
@@ -67,6 +69,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/ssr.expected.md
index 55b4d2d61..82938bbe1 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-attr-signal/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- paragraph
+ paragraph
# Render "End"
@@ -15,6 +15,7 @@
+
@@ -32,6 +33,7 @@ inserted #document/html0/body1/p0/#text0
inserted #document/html0/body1/#comment1
inserted #document/html0/body1/button2
inserted #document/html0/body1/#comment3
-inserted #document/html0/body1/script4
-inserted #document/html0/body1/script4/#text0
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/script5
+inserted #document/html0/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/html.expected/template.js
index 7ff043a43..7119c115d 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/html.expected/template.js
@@ -15,5 +15,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/1!": _$.writeExistingScope(_dynamicScope),
"#text/1(": _$.normalizeDynamicRenderer(tagName)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/resume.expected.md
index aaa530421..95afffd64 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/resume.expected.md
@@ -13,6 +13,7 @@
+
@@ -39,6 +40,7 @@ container.querySelector("button").click()
id="dynamic"
/>
+
@@ -68,6 +70,7 @@ container.querySelector("button").click()
Id is dynamic
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/ssr.expected.md
index 30846397c..ae8e435ba 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Id is dynamic
+ Id is dynamic
# Render "End"
@@ -17,6 +17,7 @@
+
@@ -38,6 +39,7 @@ inserted #document/html0/body1/div3/#comment1
inserted #document/html0/body1/div3/#text2
inserted #document/html0/body1/div3/#comment3
inserted #document/html0/body1/#comment4
-inserted #document/html0/body1/script5
-inserted #document/html0/body1/script5/#text0
+inserted #document/html0/body1/#comment5
+inserted #document/html0/body1/script6
+inserted #document/html0/body1/script6/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/html.expected/template.js
index 305abd6f6..e853e44cf 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/html.expected/template.js
@@ -17,5 +17,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0!": _$.writeExistingScope(_dynamicScope),
"#text/0(": _$.normalizeDynamicRenderer(tagName)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/resume.expected.md
index 1cf7476d2..8b6e5d207 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/resume.expected.md
@@ -13,6 +13,7 @@
+
@@ -40,6 +41,7 @@ container.querySelector("button").click()
+
@@ -69,6 +71,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/ssr.expected.md
index 9a113d90d..dde00cbb4 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Child 1 has 3
+ Child 1 has 3
# Render "End"
@@ -17,6 +17,7 @@
+
@@ -38,6 +39,7 @@ inserted #document/html1/body1/div0/#comment3
inserted #document/html1/body1/#comment1
inserted #document/html1/body1/button2
inserted #document/html1/body1/#comment3
-inserted #document/html1/body1/script4
-inserted #document/html1/body1/script4/#text0
+inserted #document/html1/body1/#comment4
+inserted #document/html1/body1/script5
+inserted #document/html1/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/html.expected/template.js
index 8e310ab29..bbf7e1e40 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/html.expected/template.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/2!": _$.writeExistingScope(_dynamicScope),
"#text/2(": _$.normalizeDynamicRenderer(tags[0])
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/resume.expected.md
index 3be9f0c6a..7c0b22207 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/resume.expected.md
@@ -16,6 +16,7 @@
+
@@ -49,6 +50,7 @@ container.querySelector("button").click()
+
@@ -83,6 +85,7 @@ container.querySelector("button").click()
+
@@ -117,6 +120,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/ssr.expected.md
index 4eee8d418..629ea5a28 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Count: 1 1
+ Count: 1 1
# Render "End"
@@ -20,6 +20,7 @@
+
@@ -43,6 +44,7 @@ inserted #document/html0/body1/div3
inserted #document/html0/body1/div3/#text0
inserted #document/html0/body1/div3/#comment1
inserted #document/html0/body1/#comment4
-inserted #document/html0/body1/script5
-inserted #document/html0/body1/script5/#text0
+inserted #document/html0/body1/#comment5
+inserted #document/html0/body1/script6
+inserted #document/html0/body1/script6/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/html.expected/template.js
index b90d66ebf..48f7baccf 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/html.expected/template.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0!": _$.writeExistingScope(_dynamicScope),
"#text/0(": _$.normalizeDynamicRenderer(x)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/resume.expected.md
index a2211f7c2..5d471bd28 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
+
@@ -35,6 +36,7 @@ container.querySelector("button").click()
+
@@ -62,6 +64,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/ssr.expected.md
index 6c45e1423..6c958f61e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Body Content
+ Body Content
# Render "End"
@@ -12,6 +12,7 @@
+
@@ -29,6 +30,7 @@ inserted #document/html1/body1/#text0
inserted #document/html1/body1/#comment1
inserted #document/html1/body1/button2
inserted #document/html1/body1/#comment3
-inserted #document/html1/body1/script4
-inserted #document/html1/body1/script4/#text0
+inserted #document/html1/body1/#comment4
+inserted #document/html1/body1/script5
+inserted #document/html1/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/html.expected/tags/counter.js
index eb862d283..5925691a2 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/html.expected/tags/counter.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/html.expected/tags/counter.js
@@ -12,6 +12,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
x = _new_x;
}, "__tests__/tags/counter.marko_0/valueChange", _scope0_id)
});
+ _$.markResumeCleanup(_scope0_id);
return _return;
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/counter.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/resume.expected.md
index 626e482b9..d08a10dba 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-var-assignment/__snapshots__/resume.expected.md
@@ -11,6 +11,7 @@
+
+
+
+
+
1 reset
+ 1 reset
# Render "End"
@@ -15,6 +15,7 @@
+
{
_$.writeScope(_scope0_id, {
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/counter.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/html.expected/template.js
index 62e3e1f6f..a25af2489 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/html.expected/template.js
@@ -19,5 +19,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0!": _$.writeExistingScope(_dynamicScope),
"#text/0(": _$.normalizeDynamicRenderer(tagName)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/resume.expected.md
index b2d1e65bf..092baffa9 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/resume.expected.md
@@ -12,12 +12,14 @@
+
+
@@ -48,12 +50,14 @@ container.querySelector("#count").click()
+
+
@@ -86,6 +90,7 @@ container.querySelector("#changeTag").click()
id="changeTag"
/>
+
@@ -121,6 +126,7 @@ container.querySelector("#count").click()
id="changeTag"
/>
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/ssr.expected.md
index 6293da3c2..665aa6cb2 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -16,12 +16,14 @@
+
+
@@ -40,9 +42,11 @@ inserted #document/html1/body1/div0/button0
inserted #document/html1/body1/div0/button0/#text0
inserted #document/html1/body1/div0/button0/#comment1
inserted #document/html1/body1/div0/#comment1
+inserted #document/html1/body1/div0/#comment2
inserted #document/html1/body1/#comment1
inserted #document/html1/body1/button2
inserted #document/html1/body1/#comment3
-inserted #document/html1/body1/script4
-inserted #document/html1/body1/script4/#text0
+inserted #document/html1/body1/#comment4
+inserted #document/html1/body1/script5
+inserted #document/html1/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/html.expected/template.js
index a42c523fa..b73f8e47e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/html.expected/template.js
@@ -99,5 +99,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#div/3(": _scope4_.size ? _scope4_ : undefined,
"#div/4(": _scope5_.size ? _scope5_ : undefined
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/resume.expected.md
index 87e867ee8..e7ff2c700 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/resume.expected.md
@@ -69,6 +69,7 @@
+
@@ -155,6 +156,7 @@ container.querySelector("button").click()
+
@@ -247,6 +249,7 @@ container.querySelector("button").click()
+
@@ -335,6 +338,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/ssr.expected.md
index b2f74f507..2ed7686c9 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/for-by/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- firstsecondthird
firstsecondthird
firstsecondthird
firstsecondthird
firstsecondthird
Rotate
+ firstsecondthird
firstsecondthird
firstsecondthird
firstsecondthird
firstsecondthird
Rotate
# Render "End"
@@ -73,6 +73,7 @@
+
@@ -134,6 +135,7 @@ inserted #document/html0/body1/div0/#comment9
inserted #document/html0/body1/div0/button10
inserted #document/html0/body1/div0/button10/#text0
inserted #document/html0/body1/div0/#comment11
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/html.expected/template.js
index 31bc923a8..6d9ec4af4 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/html.expected/template.js
@@ -26,5 +26,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"items": items,
"#text/0(": _scope1_.size ? _scope1_ : undefined
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/resume.expected.md
index 7c529feb5..8f9b649f6 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/resume.expected.md
@@ -26,6 +26,7 @@
+
@@ -72,6 +73,7 @@ container.querySelector("#add").click()
+
@@ -115,6 +117,7 @@ container.querySelector("#remove").click()
+
@@ -150,6 +153,7 @@ container.querySelector("#remove").click()
+
@@ -189,6 +193,7 @@ container.querySelector("#add").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/ssr.expected.md
index b7b191e22..d7daa8c8e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/for-destructure/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Marko: HTML Reimagined
Add Remove
+ Marko: HTML Reimagined
Add Remove
# Render "End"
@@ -30,6 +30,7 @@
+
@@ -57,6 +58,7 @@ inserted #document/html0/body1/div0/#comment3
inserted #document/html0/body1/div0/button4
inserted #document/html0/body1/div0/button4/#text0
inserted #document/html0/body1/div0/#comment5
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/html.expected/template.js
index daa0cfc0e..8c2eb4c06 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/html.expected/template.js
@@ -12,6 +12,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_scope1_.set(i, _$.getScopeById(_scope1_id));
});
_$.write(_$.markResumeControlSingleNodeEnd(_scope0_id, "#text/0", _forScopeIds));
@@ -19,5 +20,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"num": num,
"#text/0(": _scope1_.size ? _scope1_ : undefined
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/resume.expected.md
index 03a593fcc..ae2be4517 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/resume.expected.md
@@ -8,7 +8,9 @@
+
+
@@ -37,7 +39,9 @@ container.querySelector("button").click()
1
+
+
@@ -69,7 +73,9 @@ container.querySelector("button").click()
2
+
+
@@ -104,7 +110,9 @@ container.querySelector("button").click()
3
+
+
@@ -142,7 +150,9 @@ container.querySelector("button").click()
4
+
+
@@ -183,7 +193,9 @@ container.querySelector("button").click()
5
+
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/ssr.expected.md
index 56c05f984..60af340db 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/for-event-handler/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -12,7 +12,9 @@
+
+
@@ -30,6 +32,8 @@ inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
inserted #document/html0/body1/#comment2
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/script5
+inserted #document/html0/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/html.expected/template.js
index 3c056efad..21c38724a 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/html.expected/template.js
@@ -20,5 +20,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"#text/1(": _scope2_.size ? _scope2_ : undefined
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/resume.expected.md
index b5b851e70..a68012fdd 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/resume.expected.md
@@ -37,6 +37,7 @@
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/ssr.expected.md
index 94f9f5779..d7a778ed6 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0: 1
1: 2
2: 3
0: 1
1: 2
2: 3
+ 0: 1
1: 2
2: 3
0: 1
1: 2
2: 3
# Render "End"
@@ -41,6 +41,7 @@
+
@@ -81,6 +82,7 @@ inserted #document/html0/body1/div5/#comment3
inserted #document/html0/body1/div5/#text4
inserted #document/html0/body1/div5/#comment5
inserted #document/html0/body1/#comment6
-inserted #document/html0/body1/script7
-inserted #document/html0/body1/script7/#text0
+inserted #document/html0/body1/#comment7
+inserted #document/html0/body1/script8
+inserted #document/html0/body1/script8/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/html.expected/template.js
index 4e318be86..20397b15e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/html.expected/template.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/resume.expected.md
index c40b98f7b..4ca5e22ac 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/resume.expected.md
@@ -12,6 +12,7 @@
+
@@ -41,6 +42,7 @@ container.querySelector("button").click()
+
@@ -71,6 +73,7 @@ container.querySelector("button").click()
+
@@ -101,6 +104,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/ssr.expected.md
index 70996af89..fb3453f64 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/html-comment-counter/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -16,6 +16,7 @@
+
@@ -35,6 +36,7 @@ inserted #document/html0/body1/div0/button0/#comment1
inserted #document/html0/body1/div0/#comment1
inserted #document/html0/body1/div0/#comment2
inserted #document/html0/body1/div0/#comment3
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/html.expected/tags/parent-el.js b/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/html.expected/tags/parent-el.js
index 21d26ee4e..838221ab1 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/html.expected/tags/parent-el.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/html.expected/tags/parent-el.js
@@ -9,6 +9,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"/": _tagVar
});
+ _$.markResumeCleanup(_scope0_id);
return _return;
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/parent-el.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/resume.expected.md
index 6da8f3d12..11fd0e8a2 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/resume.expected.md
@@ -6,12 +6,14 @@
+
+
@@ -36,12 +38,14 @@
+
DIV
+
SPAN
@@ -54,6 +58,6 @@
# Mutations
```
-#document/html0/body1/div0/#text2: "" => "DIV"
-#document/html0/body1/span1/#text2: "" => "SPAN"
+#document/html0/body1/div0/#text3: "" => "DIV"
+#document/html0/body1/span1/#text3: "" => "SPAN"
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/ssr.expected.md
index a3a01a9fe..8ef04064a 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/html-comment-var/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
+
# Render "End"
@@ -10,12 +10,14 @@
+
+
@@ -34,13 +36,15 @@ inserted #document/html0/body1
inserted #document/html0/body1/div0
inserted #document/html0/body1/div0/#comment0
inserted #document/html0/body1/div0/#comment1
-inserted #document/html0/body1/div0/#text2
-inserted #document/html0/body1/div0/#comment3
+inserted #document/html0/body1/div0/#comment2
+inserted #document/html0/body1/div0/#text3
+inserted #document/html0/body1/div0/#comment4
inserted #document/html0/body1/span1
inserted #document/html0/body1/span1/#comment0
inserted #document/html0/body1/span1/#comment1
-inserted #document/html0/body1/span1/#text2
-inserted #document/html0/body1/span1/#comment3
+inserted #document/html0/body1/span1/#comment2
+inserted #document/html0/body1/span1/#text3
+inserted #document/html0/body1/span1/#comment4
inserted #document/html0/body1/script2
inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/html.expected/template.js
index 1b4f46b6d..364dc6d5d 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/html.expected/template.js
@@ -13,5 +13,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/resume.expected.md
index f379821c2..4a5b39aaa 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/resume.expected.md
@@ -14,6 +14,7 @@
+
@@ -46,6 +47,7 @@ container.querySelector("script").click()
+
@@ -79,6 +81,7 @@ container.querySelector("script").click()
+
@@ -112,6 +115,7 @@ container.querySelector("script").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/ssr.expected.md
index d003bb7b2..20f8ccee8 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/html-script/__snapshots__/ssr.expected.md
@@ -5,7 +5,7 @@
"0": "https://markojs.com",
}
}
-
+
# Render "End"
@@ -24,6 +24,7 @@
+
@@ -39,7 +40,8 @@ inserted #document/html0/head0
inserted #document/html0/head0/script0
inserted #document/html0/head0/script0/#text0
inserted #document/html0/head0/#comment1
-inserted #document/html0/head0/script2
-inserted #document/html0/head0/script2/#text0
+inserted #document/html0/head0/#comment2
+inserted #document/html0/head0/script3
+inserted #document/html0/head0/script3/#text0
inserted #document/html0/body1
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/html.expected/template.js
index cc234d2c3..27cd7473e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/html.expected/template.js
@@ -11,5 +11,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/resume.expected.md
index 66f80a96a..38d20bb97 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/resume.expected.md
@@ -10,6 +10,7 @@
+
@@ -38,6 +39,7 @@ container.querySelector("style").click()
+
@@ -67,6 +69,7 @@ container.querySelector("style").click()
+
@@ -96,6 +99,7 @@ container.querySelector("style").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/ssr.expected.md
index 322e7286a..eb0ef051f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/html-style/__snapshots__/ssr.expected.md
@@ -3,7 +3,7 @@
.test {
content: 0
}
-
+
# Render "End"
@@ -18,6 +18,7 @@
+
@@ -33,7 +34,8 @@ inserted #document/html0/head0
inserted #document/html0/head0/style0
inserted #document/html0/head0/style0/#text0
inserted #document/html0/head0/#comment1
-inserted #document/html0/head0/script2
-inserted #document/html0/head0/script2/#text0
+inserted #document/html0/head0/#comment2
+inserted #document/html0/head0/script3
+inserted #document/html0/head0/script3/#text0
inserted #document/html0/body1
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/html.expected/template.js
index 0822423d0..ae2b46c72 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/html.expected/template.js
@@ -18,5 +18,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/1(": _ifRenderer,
"#text/1!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/resume.expected.md
index c80018f4c..022d150dd 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/resume.expected.md
@@ -6,6 +6,7 @@
+
@@ -29,6 +30,7 @@ container.querySelector("button").click()
hi
+
@@ -53,6 +55,7 @@ container.querySelector("button").click()
+
@@ -77,6 +80,7 @@ container.querySelector("button").click()
hi
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/ssr.expected.md
index 32b02725d..16456acee 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/if-default-false/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
+
# Render "End"
@@ -10,6 +10,7 @@
+
@@ -25,6 +26,7 @@ inserted #document/html0/body1
inserted #document/html0/body1/button0
inserted #document/html0/body1/#comment1
inserted #document/html0/body1/#comment2
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/html.expected/template.js
index 772295179..251f265e9 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/html.expected/template.js
@@ -11,5 +11,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0!": _$.writeExistingScope(_dynamicScope),
"#text/0(": _$.normalizeDynamicRenderer(x === 1 ? baz : foo)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/resume.expected.md
index 0d20657cf..3fa1f75e2 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
baz
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/ssr.expected.md
index e2b6a31a7..d6b8478b2 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/import-tag-ternary/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- baz
+ baz
# Render "End"
@@ -12,6 +12,7 @@
baz
+
@@ -28,6 +29,7 @@ inserted #document/html1/body1
inserted #document/html1/body1/div0
inserted #document/html1/body1/div0/#text0
inserted #document/html1/body1/#comment1
-inserted #document/html1/body1/script2
-inserted #document/html1/body1/script2/#text0
+inserted #document/html1/body1/#comment2
+inserted #document/html1/body1/script3
+inserted #document/html1/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/tags/child.js
index 9a1ef3671..97a7cedb4 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/tags/child.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/tags/child.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"state@": input.valueChange,
"otherState@": input["value" + "Change"]
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/template.js
index 2448a6618..b03f9e839 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/html.expected/template.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/resume.expected.md
index ee1e106b1..24b1b8819 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/resume.expected.md
@@ -21,10 +21,12 @@
+
source=
1
+
@@ -63,10 +65,12 @@ container.querySelectorAll("button").forEach(item => item.click())
+
source=
2
+
@@ -76,7 +80,7 @@ container.querySelectorAll("button").forEach(item => item.click())
# Mutations
```
-#document/html0/body1/#text6: "1" => "2"
+#document/html0/body1/#text7: "1" => "2"
#document/html0/body1/button0/#text0: "1" => "2"
#document/html0/body1/button2/#text0: "1" => "2"
#document/html0/body1/button0/#text4: "1" => "2"
@@ -109,10 +113,12 @@ container.querySelectorAll("button").forEach(item => item.click())
+
source=
3
+
@@ -122,7 +128,7 @@ container.querySelectorAll("button").forEach(item => item.click())
# Mutations
```
-#document/html0/body1/#text6: "2" => "3"
+#document/html0/body1/#text7: "2" => "3"
#document/html0/body1/button0/#text0: "2" => "3"
#document/html0/body1/button2/#text0: "2" => "3"
#document/html0/body1/button0/#text4: "2" => "3"
@@ -155,10 +161,12 @@ container.querySelectorAll("button").forEach(item => item.click())
+
source=
4
+
@@ -168,7 +176,7 @@ container.querySelectorAll("button").forEach(item => item.click())
# Mutations
```
-#document/html0/body1/#text6: "3" => "4"
+#document/html0/body1/#text7: "3" => "4"
#document/html0/body1/button0/#text0: "3" => "4"
#document/html0/body1/button2/#text0: "3" => "4"
#document/html0/body1/button0/#text4: "3" => "4"
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/ssr.expected.md
index 9b76a5c52..e6eeb4f90 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-child/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1|1 1|1 source=1
+ 1|1 1|1 source=1
# Render "End"
@@ -25,10 +25,12 @@
+
source=
1
+
@@ -57,10 +59,12 @@ inserted #document/html0/body1/button2/#comment3
inserted #document/html0/body1/button2/#text4
inserted #document/html0/body1/button2/#comment5
inserted #document/html0/body1/#comment3
-inserted #document/html0/body1/#text4
-inserted #document/html0/body1/#comment5
-inserted #document/html0/body1/#text6
-inserted #document/html0/body1/#comment7
-inserted #document/html0/body1/script8
-inserted #document/html0/body1/script8/#text0
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/#text5
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/#text7
+inserted #document/html0/body1/#comment8
+inserted #document/html0/body1/#comment9
+inserted #document/html0/body1/script10
+inserted #document/html0/body1/script10/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/html.expected/template.js
index 702571df7..e7976a3b7 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/html.expected/template.js
@@ -15,5 +15,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"y": y,
"y@": yChange
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/resume.expected.md
index 5d7640081..b31c21e5b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/resume.expected.md
@@ -20,6 +20,7 @@
toggle
+
@@ -57,6 +58,7 @@ container.querySelector("#inc").click()
toggle
+
@@ -95,6 +97,7 @@ container.querySelector("#inc").click()
toggle
+
@@ -133,6 +136,7 @@ container.querySelector("#toggle").click()
toggle
+
@@ -170,6 +174,7 @@ container.querySelector("#inc").click()
toggle
+
@@ -207,6 +212,7 @@ container.querySelector("#inc").click()
toggle
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/ssr.expected.md
index 2a9aa832a..bc1df2161 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-dynamic-change-handler/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1|1 toggle
+ 1|1 toggle
# Render "End"
@@ -24,6 +24,7 @@
toggle
+
@@ -47,6 +48,7 @@ inserted #document/html0/body1/#comment1
inserted #document/html0/body1/button2
inserted #document/html0/body1/button2/#text0
inserted #document/html0/body1/#comment3
-inserted #document/html0/body1/script4
-inserted #document/html0/body1/script4/#text0
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/script5
+inserted #document/html0/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/html.expected/template.js
index 0847aa5f0..4a2572967 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/html.expected/template.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"y": y,
"y@": handler
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/resume.expected.md
index 0d15e5400..c57cc62af 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/resume.expected.md
@@ -12,6 +12,7 @@
+
@@ -41,6 +42,7 @@ container.querySelector("button").click()
+
@@ -71,6 +73,7 @@ container.querySelector("button").click()
+
@@ -101,6 +104,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/ssr.expected.md
index 6c629a678..f5e3a2479 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-id/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1|1
+ 1|1
# Render "End"
@@ -16,6 +16,7 @@
+
@@ -36,6 +37,7 @@ inserted #document/html0/body1/button0/#comment3
inserted #document/html0/body1/button0/#text4
inserted #document/html0/body1/button0/#comment5
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/html.expected/template.js
index 01359d790..937718fb0 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/html.expected/template.js
@@ -11,5 +11,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
x = newValue + 1;
}, "__tests__/template.marko_0/valueChange", _scope0_id)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/resume.expected.md
index ab74694f8..2c11bb7e5 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/resume.expected.md
@@ -12,6 +12,7 @@
+
@@ -41,6 +42,7 @@ container.querySelector("button").click()
+
@@ -71,6 +73,7 @@ container.querySelector("button").click()
+
@@ -101,6 +104,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/ssr.expected.md
index 5c6b5f088..1a3759f74 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-controllable-static/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1|1
+ 1|1
# Render "End"
@@ -16,6 +16,7 @@
+
@@ -36,6 +37,7 @@ inserted #document/html0/body1/button0/#comment3
inserted #document/html0/body1/button0/#text4
inserted #document/html0/body1/button0/#comment5
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/html.expected/template.js
index cfa0da9d7..9a23cd2e9 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/html.expected/template.js
@@ -10,5 +10,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"b": b
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/resume.expected.md
index 233d8a80d..6a083291d 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/resume.expected.md
@@ -13,6 +13,7 @@
4
+
@@ -43,6 +44,7 @@ container.querySelector("button").click()
5
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/ssr.expected.md
index abbcc1aac..fab85d911 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-derived/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Increment 2 4
+ Increment 2 4
# Render "End"
@@ -17,6 +17,7 @@
4
+
@@ -38,6 +39,7 @@ inserted #document/html0/body1/#text4
inserted #document/html0/body1/#comment5
inserted #document/html0/body1/#text6
inserted #document/html0/body1/#comment7
-inserted #document/html0/body1/script8
-inserted #document/html0/body1/script8/#text0
+inserted #document/html0/body1/#comment8
+inserted #document/html0/body1/script9
+inserted #document/html0/body1/script9/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/html.expected/template.js
index 57b5e2454..3bdb1beae 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/html.expected/template.js
@@ -8,5 +8,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"x": x
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/resume.expected.md
index 72be97eb6..66e0a5bdf 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/resume.expected.md
@@ -11,6 +11,7 @@
0
+
@@ -37,6 +38,7 @@
1
+
@@ -64,6 +66,7 @@
2
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/ssr.expected.md
index b70512e3c..046354aa1 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-set-in-effect/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1 0
+ 1 0
# Render "End"
@@ -15,6 +15,7 @@
0
+
@@ -33,6 +34,7 @@ inserted #document/html0/body1/span0/#comment1
inserted #document/html0/body1/span1
inserted #document/html0/body1/span1/#text0
inserted #document/html0/body1/span1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/html.expected/template.js
index 3ad1c8763..2711ad7bb 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/html.expected/template.js
@@ -10,5 +10,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"x": x
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/resume.expected.md
index b03a4a005..930ae5c60 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/resume.expected.md
@@ -18,6 +18,7 @@
5
+
@@ -53,6 +54,7 @@ container.querySelector("button").click()
7
+
@@ -91,6 +93,7 @@ container.querySelector("button").click()
9
+
@@ -129,6 +132,7 @@ container.querySelector("button").click()
11
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/ssr.expected.md
index 66afa462e..f6e50ae81 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag-with-intersection/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1 2 3 5
+ 1 2 3 5
# Render "End"
@@ -22,6 +22,7 @@
5
+
@@ -48,6 +49,7 @@ inserted #document/html0/body1/#text8
inserted #document/html0/body1/#comment9
inserted #document/html0/body1/#text10
inserted #document/html0/body1/#comment11
-inserted #document/html0/body1/script12
-inserted #document/html0/body1/script12/#text0
+inserted #document/html0/body1/#comment12
+inserted #document/html0/body1/script13
+inserted #document/html0/body1/script13/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/html.expected/template.js
index 49af0c308..6b1f214d4 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/html.expected/template.js
@@ -9,5 +9,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"x": x,
"y": y
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/resume.expected.md
index 3568bd518..240344ca2 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/resume.expected.md
@@ -10,6 +10,7 @@
1
+
@@ -37,6 +38,7 @@ container.querySelector("button").click()
2
+
@@ -65,6 +67,7 @@ container.querySelector("button").click()
4
+
@@ -93,6 +96,7 @@ container.querySelector("button").click()
8
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/ssr.expected.md
index 3430e4b20..6ba70a18c 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-tag/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1 1
+ 1 1
# Render "End"
@@ -14,6 +14,7 @@
1
+
@@ -32,6 +33,7 @@ inserted #document/html0/body1/button0/#comment1
inserted #document/html0/body1/#comment1
inserted #document/html0/body1/#text2
inserted #document/html0/body1/#comment3
-inserted #document/html0/body1/script4
-inserted #document/html0/body1/script4/#text0
+inserted #document/html0/body1/#comment4
+inserted #document/html0/body1/script5
+inserted #document/html0/body1/script5/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-undefined-until-dom/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/let-undefined-until-dom/__snapshots__/html.expected/template.js
index ed543c5c5..a98e94f3c 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-undefined-until-dom/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-undefined-until-dom/__snapshots__/html.expected/template.js
@@ -4,5 +4,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
const x = undefined;
_$.write(`${_$.escapeXML(x)}${_$.markResumeNode(_scope0_id, "#text/0")}
`);
_$.writeEffect(_scope0_id, "__tests__/template.marko_0");
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-undefined-until-dom/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-undefined-until-dom/__snapshots__/resume.expected.md
index edcdeb046..5c23b083a 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-undefined-until-dom/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-undefined-until-dom/__snapshots__/resume.expected.md
@@ -7,6 +7,7 @@
+
@@ -29,6 +30,7 @@
Client Only
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/let-undefined-until-dom/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/let-undefined-until-dom/__snapshots__/ssr.expected.md
index 42a374f4d..35cbf4e5f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/let-undefined-until-dom/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/let-undefined-until-dom/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
+
# Render "End"
@@ -11,6 +11,7 @@
+
@@ -26,6 +27,7 @@ inserted #document/html0/body1
inserted #document/html0/body1/div0
inserted #document/html0/body1/div0/#text0
inserted #document/html0/body1/div0/#comment1
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/html.expected/template.js
index e752cbf0e..3de6f11ad 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/html.expected/template.js
@@ -8,5 +8,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"x": x
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/resume.expected.md
index 8f25198ff..27be88cdb 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/resume.expected.md
@@ -20,6 +20,7 @@
Increment
+
@@ -57,6 +58,7 @@ container.querySelector("#increment")?.click()
Increment
+
@@ -95,6 +97,7 @@ container.querySelector("#increment")?.click()
Increment
+
@@ -130,6 +133,7 @@ container.querySelector("#increment")?.click()
Increment
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/ssr.expected.md
index 8fc32ea5a..16a2f4e2b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-assignment/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- x=0 , was=
Increment
+ x=0 , was=
Increment
# Render "End"
@@ -24,6 +24,7 @@
Increment
+
@@ -48,6 +49,7 @@ inserted #document/html0/body1/div0/#comment5
inserted #document/html0/body1/button1
inserted #document/html0/body1/button1/#text0
inserted #document/html0/body1/#comment2
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-conditional/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-conditional/__snapshots__/html.expected/template.js
index ab2327bbf..0350ffd90 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-conditional/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-conditional/__snapshots__/html.expected/template.js
@@ -10,6 +10,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
_ifScopeId = _scope1_id;
}
@@ -22,5 +23,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/0(": _ifRenderer,
"#text/0!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this-attrs/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this-attrs/__snapshots__/html.expected/template.js
index 5e2618bd4..5bf853fee 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this-attrs/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this-attrs/__snapshots__/html.expected/template.js
@@ -4,5 +4,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
const x = 0;
_$.write(`${_$.escapeXML(x)}${_$.markResumeNode(_scope0_id, "#text/0")}
`);
_$.writeEffect(_scope0_id, "__tests__/template.marko_0");
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this-attrs/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this-attrs/__snapshots__/resume.expected.md
index bcde3afda..5200ea66a 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this-attrs/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this-attrs/__snapshots__/resume.expected.md
@@ -7,6 +7,7 @@
0
+
@@ -29,6 +30,7 @@
1
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this-attrs/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this-attrs/__snapshots__/ssr.expected.md
index 43b83da60..c25be4fa2 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this-attrs/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this-attrs/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -11,6 +11,7 @@
0
+
@@ -26,6 +27,7 @@ inserted #document/html0/body1
inserted #document/html0/body1/div0
inserted #document/html0/body1/div0/#text0
inserted #document/html0/body1/div0/#comment1
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/html.expected/template.js
index cfbaff4bd..d0f58b77f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/html.expected/template.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"x": x
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/resume.expected.md
index b7808dbdf..bf7a45673 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/resume.expected.md
@@ -14,6 +14,7 @@
Increment
+
@@ -45,6 +46,7 @@ container.querySelector("#increment")?.click()
Increment
+
@@ -77,6 +79,7 @@ container.querySelector("#increment")?.click()
Increment
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/ssr.expected.md
index e227bc557..c21288d52 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-this/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
Increment
+
Increment
# Render "End"
@@ -16,6 +16,7 @@
Increment
+
@@ -32,6 +33,7 @@ inserted #document/html0/body1/div0
inserted #document/html0/body1/button1
inserted #document/html0/body1/button1/#text0
inserted #document/html0/body1/#comment2
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/html.expected/template.js
index cfbaff4bd..d0f58b77f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/html.expected/template.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"x": x
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/resume.expected.md
index 12c2a07d8..78985b13f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/resume.expected.md
@@ -14,6 +14,7 @@
Increment
+
@@ -45,6 +46,7 @@ container.querySelector("#increment")?.click()
Increment
+
@@ -77,6 +79,7 @@ container.querySelector("#increment")?.click()
Increment
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/ssr.expected.md
index e227bc557..c21288d52 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/lifecycle-tag/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
Increment
+
Increment
# Render "End"
@@ -16,6 +16,7 @@
Increment
+
@@ -32,6 +33,7 @@ inserted #document/html0/body1/div0
inserted #document/html0/body1/button1
inserted #document/html0/body1/button1/#text0
inserted #document/html0/body1/#comment2
-inserted #document/html0/body1/script3
-inserted #document/html0/body1/script3/#text0
+inserted #document/html0/body1/#comment3
+inserted #document/html0/body1/script4
+inserted #document/html0/body1/script4/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/log-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/log-tag/__snapshots__/html.expected/template.js
index 86384bba4..ecfbc7f4b 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/log-tag/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/log-tag/__snapshots__/html.expected/template.js
@@ -10,5 +10,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
const output = JSON.stringify(testLog);
_$.write(`${_$.escapeXML(output)}${_$.markResumeNode(_scope0_id, "#text/0")}`);
_$.writeEffect(_scope0_id, "__tests__/template.marko_0");
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/log-tag/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/log-tag/__snapshots__/resume.expected.md
index ca2482b14..cfa71be1a 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/log-tag/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/log-tag/__snapshots__/resume.expected.md
@@ -6,6 +6,7 @@
{"identifier":true,"tag var":true,"static var":true}
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/log-tag/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/log-tag/__snapshots__/ssr.expected.md
index a1ea751d0..8758eb667 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/log-tag/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/log-tag/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- {"identifier":true,"tag var":true,"static var":true}
+ {"identifier":true,"tag var":true,"static var":true}
# Render "End"
@@ -10,6 +10,7 @@
{"identifier":true,"tag var":true,"static var":true}
+
@@ -25,6 +26,7 @@ inserted #document/html1/head0
inserted #document/html1/body1
inserted #document/html1/body1/#text0
inserted #document/html1/body1/#comment1
-inserted #document/html1/body1/script2
-inserted #document/html1/body1/script2/#text0
+inserted #document/html1/body1/#comment2
+inserted #document/html1/body1/script3
+inserted #document/html1/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/migrate-effect-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/migrate-effect-tag/__snapshots__/html.expected/template.js
index 4145112f8..4dffb00c6 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/migrate-effect-tag/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/migrate-effect-tag/__snapshots__/html.expected/template.js
@@ -4,5 +4,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
const x = 1;
_$.write(`${_$.escapeXML(x)}${_$.markResumeNode(_scope0_id, "#text/0")}
`);
_$.writeEffect(_scope0_id, "__tests__/template.marko_0");
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/migrate-effect-tag/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/migrate-effect-tag/__snapshots__/resume.expected.md
index ddfdd9ec3..e3f2b25ca 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/migrate-effect-tag/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/migrate-effect-tag/__snapshots__/resume.expected.md
@@ -7,6 +7,7 @@
1
+
@@ -29,6 +30,7 @@
2
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/migrate-effect-tag/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/migrate-effect-tag/__snapshots__/ssr.expected.md
index 472510327..9b2552f2d 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/migrate-effect-tag/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/migrate-effect-tag/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1
+ 1
# Render "End"
@@ -11,6 +11,7 @@
1
+
@@ -26,6 +27,7 @@ inserted #document/html0/body1
inserted #document/html0/body1/div0
inserted #document/html0/body1/div0/#text0
inserted #document/html0/body1/div0/#comment1
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/html.expected/template.js
index 7f3c7150d..af5e58cdb 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/html.expected/template.js
@@ -9,5 +9,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"clickCount": clickCount
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/resume.expected.md
index b578f97f7..9cafb4e53 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/resume.expected.md
@@ -18,6 +18,7 @@
0
+
@@ -53,6 +54,7 @@ container.querySelector("button").click()
0
+
@@ -88,6 +90,7 @@ container.querySelector("button").click()
1
+
@@ -125,6 +128,7 @@ container.querySelector("button").click()
2
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/ssr.expected.md
index d640a294e..632ad485d 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/nested-assignment-expression/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 used to be 0 which should be the same as 0
+ 0 used to be 0 which should be the same as 0
# Render "End"
@@ -22,6 +22,7 @@
0
+
@@ -46,6 +47,7 @@ inserted #document/html0/body1/#text4
inserted #document/html0/body1/span5
inserted #document/html0/body1/span5/#text0
inserted #document/html0/body1/span5/#comment1
-inserted #document/html0/body1/script6
-inserted #document/html0/body1/script6/#text0
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/script7
+inserted #document/html0/body1/script7/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/html.expected/template.js
index 16525860a..1373eec0f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/html.expected/template.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/resume.expected.md
index c654a3d02..c82db03b1 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/resume.expected.md
@@ -24,6 +24,7 @@
+
@@ -65,6 +66,7 @@ container.querySelector("#addTwo").click()
+
@@ -108,6 +110,7 @@ container.querySelector("#triple").click()
+
@@ -151,6 +154,7 @@ container.querySelector("#cube").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/ssr.expected.md
index a636a8d2c..4fda60094 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/reassignment-expression-counter/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 0 0
+ 0 0 0
# Render "End"
@@ -28,6 +28,7 @@
+
@@ -52,6 +53,7 @@ inserted #document/html0/body1/button4
inserted #document/html0/body1/button4/#text0
inserted #document/html0/body1/button4/#comment1
inserted #document/html0/body1/#comment5
-inserted #document/html0/body1/script6
-inserted #document/html0/body1/script6/#text0
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/script7
+inserted #document/html0/body1/script7/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/html.expected/tags/child.js b/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/html.expected/tags/child.js
index f6b19132a..c536d0612 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/html.expected/tags/child.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/html.expected/tags/child.js
@@ -7,6 +7,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"/": _tagVar
});
+ _$.markResumeCleanup(_scope0_id);
return _return;
});
export default /* @__PURE__ */_$.createTemplate("__tests__/tags/child.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/resume.expected.md
index 663103f78..8faef3f07 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/resume.expected.md
@@ -6,6 +6,7 @@
child
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/ssr.expected.md
index 2de4aca0a..fec556ce2 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/return-tag-no-var/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- child
+ child
# Render "End"
@@ -10,6 +10,7 @@
child
+
@@ -24,6 +25,7 @@ inserted #document/html0/head0
inserted #document/html0/body1
inserted #document/html0/body1/span0
inserted #document/html0/body1/span0/#text0
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/html.expected/template.js
index a14957d28..adeb99d4c 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/html.expected/template.js
@@ -17,5 +17,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/resume.expected.md
index cdf68aae0..46fca01fa 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/resume.expected.md
@@ -12,6 +12,7 @@
+
@@ -41,6 +42,7 @@ container.querySelector("button").click()
+
@@ -71,6 +73,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/ssr.expected.md
index faea0f15b..4fd47cd83 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/same-source-non-alias/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 0
+ 0 0
# Render "End"
@@ -16,6 +16,7 @@
+
@@ -36,6 +37,7 @@ inserted #document/html0/body1/button0/#comment3
inserted #document/html0/body1/button0/#text4
inserted #document/html0/body1/button0/#comment5
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/html.expected/template.js
index 85fde9f57..093dc7b7f 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/html.expected/template.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"x": x
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/resume.expected.md
index 4fc68558a..c893a6c9e 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
>
1
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/ssr.expected.md
index 8b93f83ce..16e0b35f0 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/script-tag/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -12,6 +12,7 @@
>
0
+
@@ -26,6 +27,7 @@ inserted #document/html0/head0
inserted #document/html0/body1
inserted #document/html0/body1/div0
inserted #document/html0/body1/div0/#text0
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/html.expected/template.js
index b9213b6ae..dec6a4482 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/html.expected/template.js
@@ -16,5 +16,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"_count2": _count2,
"_count3": _count3
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/resume.expected.md
index d21be0969..0a3983fe1 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/resume.expected.md
@@ -31,6 +31,7 @@
+
@@ -79,6 +80,7 @@ container.querySelectorAll("button")[buttonNum++].click()
+
@@ -127,6 +129,7 @@ container.querySelectorAll("button")[buttonNum++].click()
+
@@ -175,6 +178,7 @@ container.querySelectorAll("button")[buttonNum++].click()
+
@@ -223,6 +227,7 @@ container.querySelectorAll("button")[buttonNum++].click()
+
@@ -271,6 +276,7 @@ buttonNum = 0
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/ssr.expected.md
index db7eef77a..b308a42c7 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/shadow-same-scope/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -35,6 +35,7 @@
+
@@ -67,6 +68,7 @@ inserted #document/html0/body1/div1/button0
inserted #document/html0/body1/div1/button0/#text0
inserted #document/html0/body1/div1/button0/#comment1
inserted #document/html0/body1/div1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/tag-var-destructure/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/tag-var-destructure/__snapshots__/html.expected/template.js
index cd3fc78b7..41b57fdaa 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/tag-var-destructure/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/tag-var-destructure/__snapshots__/html.expected/template.js
@@ -10,5 +10,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
const e = [];
_$.write(`a 1 ${_$.escapeXML(a)}${_$.markResumeNode(_scope0_id, "#text/1")} b 2 ${_$.escapeXML(b)}${_$.markResumeNode(_scope0_id, "#text/2")} c {c:4} ${_$.escapeXML(JSON.stringify(c))}${_$.markResumeNode(_scope0_id, "#text/3")} d 7 ${_$.escapeXML(d)}${_$.markResumeNode(_scope0_id, "#text/4")} f [9] ${_$.escapeXML(JSON.stringify(e))}${_$.markResumeNode(_scope0_id, "#text/5")} ${_$.markResumeNode(_scope0_id, "#button/0")}`);
_$.writeEffect(_scope0_id, "__tests__/template.marko_0");
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/tag-var-destructure/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/tag-var-destructure/__snapshots__/resume.expected.md
index 0a302ecec..fcfd38f63 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/tag-var-destructure/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/tag-var-destructure/__snapshots__/resume.expected.md
@@ -36,6 +36,7 @@
+
@@ -89,6 +90,7 @@ container?.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/tag-var-destructure/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/tag-var-destructure/__snapshots__/ssr.expected.md
index eeb0b34b2..2da30afc5 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/tag-var-destructure/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/tag-var-destructure/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- a 1 0 b 2 0 c {c:4} {} d 7 0 f [9] []
+ a 1 0 b 2 0 c {c:4} {} d 7 0 f [9] []
# Render "End"
@@ -40,6 +40,7 @@
+
@@ -79,6 +80,7 @@ inserted #document/html0/body1/button0/pre4/#comment1
inserted #document/html0/body1/button0/pre4/#text2
inserted #document/html0/body1/button0/pre4/#comment3
inserted #document/html0/body1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/html.expected/template.js
index bd17d04e7..270b8df25 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/html.expected/template.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"clickCount": clickCount
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/resume.expected.md
index 593edac01..9ce8cf210 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/resume.expected.md
@@ -11,6 +11,7 @@
+
@@ -40,6 +41,7 @@ container.querySelector("button").click()
+
@@ -69,6 +71,7 @@ container.querySelector("button").click()
+
@@ -98,6 +101,7 @@ container.querySelector("button").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/ssr.expected.md
index 72466b2a3..a9eb8499d 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/text-content-counter/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -15,6 +15,7 @@
+
@@ -31,6 +32,7 @@ inserted #document/html0/body1/div0
inserted #document/html0/body1/div0/button0
inserted #document/html0/body1/div0/button0/#text0
inserted #document/html0/body1/div0/#comment1
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/html.expected/template.js
index bdeb54622..543801d08 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/html.expected/template.js
@@ -12,6 +12,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope1_id, {
"_": _$.ensureScopeWithId(_scope0_id)
});
+ _$.markResumeCleanup(_scope1_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
_ifScopeId = _scope1_id;
}
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/resume.expected.md
index 7f9105c03..8695301a3 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/resume.expected.md
@@ -8,6 +8,7 @@
Hello
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/ssr.expected.md
index 0f7bc16b7..c87091b71 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-first-child/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- Hello
+ Hello
# Render "End"
@@ -12,6 +12,7 @@
Hello
+
@@ -33,8 +34,9 @@ inserted #document/html0/body1/div0/span0
inserted #document/html0/body1/div0/span0/#text0
inserted #document/html0/body1/div0/span0/#comment1
inserted #document/html0/body1/div0/#comment1
-inserted #document/html0/body1/div0/span2
+inserted #document/html0/body1/div0/#comment2
inserted #document/html0/body1/div0/span3
+inserted #document/html0/body1/div0/span4
inserted #document/html0/body1/script1
inserted #document/html0/body1/script1/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/html.expected/template.js
index e69274f3d..a434fbec9 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/html.expected/template.js
@@ -18,6 +18,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope2_id, {
"_": _$.ensureScopeWithId(_scope1_id)
});
+ _$.markResumeCleanup(_scope2_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer");
_ifScopeId = _scope2_id;
}
@@ -28,6 +29,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/1(": _ifRenderer,
"#text/1!": _$.getScopeById(_ifScopeId)
});
+ _$.markResumeCleanup(_scope1_id);
_$.register(_ifRenderer2 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
_ifScopeId2 = _scope1_id;
}
@@ -40,5 +42,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/1(": _ifRenderer2,
"#text/1!": _$.getScopeById(_ifScopeId2)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/resume.expected.md
index e66235ee8..db26ef094 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/resume.expected.md
@@ -20,9 +20,12 @@
+
+
+
@@ -60,9 +63,12 @@ container.querySelector("#count").click()
+
+
+
@@ -100,9 +106,12 @@ container.querySelector("#count").click()
+
+
+
@@ -135,8 +144,11 @@ container.querySelector("#inner").click()
+
+
+
@@ -146,7 +158,7 @@ container.querySelector("#inner").click()
# Mutations
```
-removed #document/html0/body1/div0/#comment5 after #document/html0/body1/div0/#comment6
+removed #document/html0/body1/div0/#comment5 after #document/html0/body1/div0/#comment7
inserted #document/html0/body1/div0/#comment5
removed button after #document/html0/body1/div0/#comment5
```
@@ -175,8 +187,11 @@ container.querySelector("#inner").click()
2
+
+
+
@@ -215,8 +230,11 @@ container.querySelector("#count").click()
3
+
+
+
@@ -244,6 +262,7 @@ container.querySelector("#outer").click()
+
@@ -260,6 +279,8 @@ removed button after #document/html0/body1/div0/#comment2
removed #comment after #document/html0/body1/div0/#comment2
removed button after #document/html0/body1/div0/#comment2
removed #comment after #document/html0/body1/div0/#comment2
+removed #comment after #document/html0/body1/div0/#comment2
+removed #comment after #document/html0/body1/div0/#comment2
```
@@ -285,6 +306,7 @@ container.querySelector("#outer").click()
+
@@ -326,6 +348,7 @@ container.querySelector("#count").click()
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/ssr.expected.md
index d42671488..d078400ed 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -24,9 +24,12 @@
+
+
+
@@ -51,6 +54,9 @@ inserted #document/html0/body1/div0/button5/#comment1
inserted #document/html0/body1/div0/#comment6
inserted #document/html0/body1/div0/#comment7
inserted #document/html0/body1/div0/#comment8
-inserted #document/html0/body1/script1
-inserted #document/html0/body1/script1/#text0
+inserted #document/html0/body1/div0/#comment9
+inserted #document/html0/body1/div0/#comment10
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested/__snapshots__/html.expected/template.js
index bd5255448..623dfc169 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/toggle-nested/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-nested/__snapshots__/html.expected/template.js
@@ -19,6 +19,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope2_id, {
"_": _$.ensureScopeWithId(_scope1_id)
});
+ _$.markResumeCleanup(_scope2_id);
_$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_2_renderer");
_ifScopeId = _scope2_id;
}
@@ -31,6 +32,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope3_id, {
"_": _$.ensureScopeWithId(_scope1_id)
});
+ _$.markResumeCleanup(_scope3_id);
_$.register(_ifRenderer2 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_3_renderer");
_ifScopeId2 = _scope3_id;
}
@@ -42,6 +44,7 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/1(": _ifRenderer2,
"#text/1!": _$.getScopeById(_ifScopeId2)
});
+ _$.markResumeCleanup(_scope1_id);
_$.register(_ifRenderer3 = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
_ifScopeId3 = _scope1_id;
}
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/.name-cache.json b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/.name-cache.json
new file mode 100644
index 000000000..aa6800f09
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/.name-cache.json
@@ -0,0 +1,18 @@
+{
+ "vars": {
+ "props": {
+ "$_$": "t",
+ "$init": "n",
+ "$_expr_input_onCount_clickCount_effect": "o",
+ "$_expr_input_onCount_clickCount": "e",
+ "$_clickCount": "r",
+ "$_input_onCount_": "i",
+ "$_setup$if_content": "a",
+ "$_if_content": "c",
+ "$_if": "u",
+ "$_show": "m",
+ "$_onCount": "s",
+ "$_onCount$if_content": "l"
+ }
+ }
+}
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/csr-sanitized.expected.md b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/csr-sanitized.expected.md
new file mode 100644
index 000000000..348486018
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/csr-sanitized.expected.md
@@ -0,0 +1,18 @@
+# Render {}
+```html
+
+```
+
+
+# Render
+container.querySelector("button").click()
+
+```html
+
+```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/csr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/csr.expected.md
new file mode 100644
index 000000000..a65f556fd
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/csr.expected.md
@@ -0,0 +1,29 @@
+# Render {}
+```html
+
+```
+
+# Mutations
+```
+inserted div0
+```
+
+
+# Render
+container.querySelector("button").click()
+
+```html
+
+```
+
+# Mutations
+```
+inserted div0/#text0
+removed div after div0/#text0
+```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/dom.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/dom.expected/tags/counter.js
new file mode 100644
index 000000000..a8fb8f045
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/dom.expected/tags/counter.js
@@ -0,0 +1,26 @@
+export const _template_ = " ";
+export const _walks_ = /* get, next(1), get, out(1) */" D l";
+import * as _$ from "@marko/runtime-tags/debug/dom";
+const _expr_input_onCount_clickCount_effect = _$.effect("__tests__/tags/counter.marko_0_input_onCount_clickCount", (_scope, {
+ input_onCount,
+ clickCount
+}) => _$.on(_scope["#button/0"], "click", function () {
+ input_onCount(_clickCount(_scope, clickCount + 1));
+}));
+const _expr_input_onCount_clickCount = /* @__PURE__ */_$.intersection(2, _scope => {
+ const {
+ input_onCount,
+ clickCount
+ } = _scope;
+ _expr_input_onCount_clickCount_effect(_scope);
+});
+const _clickCount = /* @__PURE__ */_$.state("clickCount", (_scope, clickCount) => _$.data(_scope["#text/1"], ((() => {
+ if (clickCount > 0) throw new Error("This should not have executed since the parent removes this component when the count is greater than 0");
+})(), clickCount)), () => _expr_input_onCount_clickCount);
+export const _input_onCount_ = /* @__PURE__ */_$.value("input_onCount", 0, () => _expr_input_onCount_clickCount);
+export const _input_ = /* @__PURE__ */_$.value("input", (_scope, input) => _input_onCount_(_scope, input.onCount), () => _input_onCount_);
+export const _params__ = /* @__PURE__ */_$.value("_params_", (_scope, _params_) => _input_(_scope, _params_[0]), () => _input_);
+export function _setup_(_scope) {
+ _clickCount(_scope, 0);
+}
+export default /* @__PURE__ */_$.createTemplate("__tests__/tags/counter.marko", _template_, _walks_, _setup_, void 0, () => _params__);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/dom.expected/template.hydrate.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/dom.expected/template.hydrate.js
new file mode 100644
index 000000000..7f8370496
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/dom.expected/template.hydrate.js
@@ -0,0 +1,59 @@
+// size: 643 (min) 340 (brotli)
+const _expr_input_onCount_clickCount_effect = _$.effect(
+ "a0",
+ (_scope, { 4: input_onCount, 5: clickCount }) =>
+ _$.on(_scope[0], "click", function () {
+ input_onCount(_clickCount(_scope, clickCount + 1));
+ }),
+ ),
+ _expr_input_onCount_clickCount = _$.intersection(2, (_scope) => {
+ _expr_input_onCount_clickCount_effect(_scope);
+ }),
+ _clickCount = _$.state(
+ 5,
+ (_scope, clickCount) =>
+ _$.data(
+ _scope[1],
+ ((() => {
+ if (clickCount > 0)
+ throw new Error(
+ "This should not have executed since the parent removes this component when the count is greater than 0",
+ );
+ })(),
+ clickCount),
+ ),
+ () => _expr_input_onCount_clickCount,
+ ),
+ _input_onCount_ = _$.value(4, 0, () => _expr_input_onCount_clickCount);
+const _onCount$if_content = _$.closure(
+ 2,
+ (_scope, onCount) => _input_onCount_(_scope[0], onCount),
+ void 0,
+ () => _$.inChild(0, _input_onCount_),
+ ),
+ _setup$if_content = (_scope) => {
+ !(function (_scope) {
+ _clickCount(_scope, 0);
+ })(_scope[0]);
+ },
+ _if_content = _$.register(
+ "b1",
+ _$.createRenderer(
+ "
",
+ "D/ D l&",
+ _setup$if_content,
+ () => [_onCount$if_content],
+ ),
+ ),
+ _if = _$.conditional(0, 0),
+ _show = _$.state(
+ 1,
+ (_scope, show) => _if(_scope, show ? _if_content : null),
+ () => _if,
+ );
+_$.register("b0", function (_scope) {
+ return function (count) {
+ _show(_scope, count < 1);
+ };
+}),
+ init();
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/dom.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/dom.expected/template.js
new file mode 100644
index 000000000..0947a1534
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/dom.expected/template.js
@@ -0,0 +1,23 @@
+export const _template_ = "
";
+export const _walks_ = /* next(1), replace, out(1) */"D%l";
+import { _setup_ as _counter, _input_onCount_ as _counter_input_onCount, _template_ as _counter_template, _walks_ as _counter_walks } from "./tags/counter.marko";
+import * as _$ from "@marko/runtime-tags/debug/dom";
+const _onCount$if_content = /* @__PURE__ */_$.closure("onCount", (_scope, onCount) => _counter_input_onCount(_scope["#childScope/0"], onCount), void 0, () => _$.inChild("#childScope/0", _counter_input_onCount));
+const _setup$if_content = _scope => {
+ _counter(_scope["#childScope/0"]);
+};
+const _if_content = _$.register("__tests__/template.marko_1_renderer", /* @__PURE__ */_$.createRenderer(`${_counter_template}
`, /* next(1), beginChild, _counter_walks, endChild */`D/${_counter_walks}&`, _setup$if_content, () => [_onCount$if_content]));
+const _if = /* @__PURE__ */_$.conditional("#text/0", 0);
+const _onCount = /* @__PURE__ */_$.value("onCount", 0, () => _$.inConditionalScope(_onCount$if_content, "#text/0"));
+const _show = /* @__PURE__ */_$.state("show", (_scope, show) => _if(_scope, show ? _if_content : null), () => _if);
+export function _setup_(_scope) {
+ _show(_scope, true);
+ _onCount(_scope, _onCount2(_scope));
+}
+function _onCount2(_scope) {
+ return function (count) {
+ _show(_scope, count < 1);
+ };
+}
+_$.register("__tests__/template.marko_0/onCount", _onCount2);
+export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _template_, _walks_, _setup_);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/tags/counter.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/tags/counter.js
new file mode 100644
index 000000000..48268c67b
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/tags/counter.js
@@ -0,0 +1,15 @@
+import * as _$ from "@marko/runtime-tags/debug/html";
+const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
+ const _scope0_id = _$.nextScopeId();
+ const clickCount = 0;
+ _$.write(`${_$.escapeXML(((() => {
+ if (clickCount > 0) throw new Error("This should not have executed since the parent removes this component when the count is greater than 0");
+ })(), clickCount))}${_$.markResumeNode(_scope0_id, "#text/1")} ${_$.markResumeNode(_scope0_id, "#button/0")}`);
+ _$.writeEffect(_scope0_id, "__tests__/tags/counter.marko_0_input_onCount_clickCount");
+ _$.writeScope(_scope0_id, {
+ "input_onCount": input.onCount,
+ "clickCount": clickCount
+ });
+ _$.markResumeCleanup(_scope0_id);
+});
+export default /* @__PURE__ */_$.createTemplate("__tests__/tags/counter.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/template.js
new file mode 100644
index 000000000..3d3917968
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/html.expected/template.js
@@ -0,0 +1,34 @@
+import * as _$ from "@marko/runtime-tags/debug/html";
+import _counter from "./tags/counter.marko";
+const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
+ const _scope0_id = _$.nextScopeId();
+ const show = true;
+ const onCount = _$.register(function (count) {
+ show = count < 1;
+ }, "__tests__/template.marko_0/onCount", _scope0_id);
+ _$.write("");
+ let _ifScopeId, _ifRenderer;
+ if (show) {
+ const _scope1_id = _$.nextScopeId();
+ _$.write("
");
+ const _childScope = _$.peekNextScope();
+ _counter({
+ onCount: onCount
+ });
+ _$.write("
");
+ _$.writeScope(_scope1_id, {
+ "#childScope/0": _$.writeExistingScope(_childScope)
+ });
+ _$.markResumeCleanup(_scope1_id);
+ _$.register(_ifRenderer = /* @__PURE__ */_$.createRenderer(() => {}), "__tests__/template.marko_1_renderer");
+ _ifScopeId = _scope1_id;
+ }
+ _$.write(`${_$.markResumeControlSingleNodeEnd(_scope0_id, "#text/0", _ifScopeId)}
`);
+ _$.writeScope(_scope0_id, {
+ "onCount": onCount,
+ "#text/0(": _ifRenderer,
+ "#text/0!": _$.getScopeById(_ifScopeId)
+ });
+ _$.markResumeCleanup(_scope0_id);
+});
+export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/resume-sanitized.expected.md b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/resume-sanitized.expected.md
new file mode 100644
index 000000000..348486018
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/resume-sanitized.expected.md
@@ -0,0 +1,18 @@
+# Render {}
+```html
+
+```
+
+
+# Render
+container.querySelector("button").click()
+
+```html
+
+```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/resume.expected.md
new file mode 100644
index 000000000..14981f8d0
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/resume.expected.md
@@ -0,0 +1,56 @@
+# Render {}
+```html
+
+
+
+
+
+
+
+```
+
+# Mutations
+```
+
+```
+
+
+# Render
+container.querySelector("button").click()
+
+```html
+
+
+
+
+
+
+
+
+
+
+```
+
+# Mutations
+```
+removed #document/html0/body1/div0/#comment0 after #document/html0/body1/div0/#comment1
+inserted #document/html0/body1/div0/#comment0
+removed div after #document/html0/body1/div0/#comment0
+```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/ssr-sanitized.expected.md b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/ssr-sanitized.expected.md
new file mode 100644
index 000000000..bedce9c58
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/ssr-sanitized.expected.md
@@ -0,0 +1,10 @@
+# Render "End"
+```html
+
+```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/ssr.expected.md
new file mode 100644
index 000000000..9d60c6d38
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/__snapshots__/ssr.expected.md
@@ -0,0 +1,47 @@
+# Write
+
+
+
+# Render "End"
+```html
+
+
+
+
+
+
+
+```
+
+# Mutations
+```
+inserted #document/html0
+inserted #document/html0/head0
+inserted #document/html0/body1
+inserted #document/html0/body1/div0
+inserted #document/html0/body1/div0/div0
+inserted #document/html0/body1/div0/div0/button0
+inserted #document/html0/body1/div0/div0/button0/#text0
+inserted #document/html0/body1/div0/div0/button0/#comment1
+inserted #document/html0/body1/div0/div0/#comment1
+inserted #document/html0/body1/div0/div0/#comment2
+inserted #document/html0/body1/div0/#comment1
+inserted #document/html0/body1/div0/#comment2
+inserted #document/html0/body1/#comment1
+inserted #document/html0/body1/script2
+inserted #document/html0/body1/script2/#text0
+```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/tags/counter.marko b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/tags/counter.marko
new file mode 100644
index 000000000..c5db766b8
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/tags/counter.marko
@@ -0,0 +1,6 @@
+
+${(() => {
+ if (clickCount > 0) throw new Error("This should not have executed since the parent removes this component when the count is greater than 0")
+})(), clickCount}
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/template.marko b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/template.marko
new file mode 100644
index 000000000..1da46ddee
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/template.marko
@@ -0,0 +1,11 @@
+
+
+
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/test.ts b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/test.ts
new file mode 100644
index 000000000..94e23386e
--- /dev/null
+++ b/packages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/test.ts
@@ -0,0 +1,5 @@
+export const steps = [{}, click];
+
+function click(container: Element) {
+ container.querySelector("button")!.click();
+}
diff --git a/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/html.expected/template.js
index 24161abcc..8b8a26511 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/html.expected/template.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"input_value": input.value,
"a": a
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/resume.expected.md
index a316e78d5..74e88d807 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/resume.expected.md
@@ -18,6 +18,7 @@
b="2"
/>
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/ssr.expected.md
index 53f6e50f0..cd86a0fa1 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/update-dynamic-attrs/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
-
+
# Render "End"
@@ -22,6 +22,7 @@
b="2"
/>
+
@@ -40,6 +41,7 @@ inserted #document/html0/body1/div2
inserted #document/html0/body1/#comment3
inserted #document/html0/body1/div4
inserted #document/html0/body1/#comment5
-inserted #document/html0/body1/script6
-inserted #document/html0/body1/script6/#text0
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/script7
+inserted #document/html0/body1/script7/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/user-effect-abort-signal/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/user-effect-abort-signal/__snapshots__/html.expected/template.js
index 56a063601..f383875ab 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/user-effect-abort-signal/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/user-effect-abort-signal/__snapshots__/html.expected/template.js
@@ -3,10 +3,11 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
const _scope0_id = _$.nextScopeId();
const a = 0;
const b = 0;
- _$.write(`${_$.escapeXML(a)}${_$.markResumeNode(_scope0_id, "#text/0")} ${_$.escapeXML(b)}${_$.markResumeNode(_scope0_id, "#text/1")}
${_$.markResumeCleanup(_scope0_id)}`);
+ _$.write(`${_$.escapeXML(a)}${_$.markResumeNode(_scope0_id, "#text/0")} ${_$.escapeXML(b)}${_$.markResumeNode(_scope0_id, "#text/1")}
`);
_$.writeEffect(_scope0_id, "__tests__/template.marko_0_input_value");
_$.writeScope(_scope0_id, {
"input_value": input.value
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/html.expected/template.js b/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/html.expected/template.js
index 200b41594..6141e4a82 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/html.expected/template.js
+++ b/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/html.expected/template.js
@@ -10,5 +10,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"#childScope/0": _$.writeExistingScope(_childScope)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file
diff --git a/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/resume.expected.md b/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/resume.expected.md
index 1f80d5d33..02d63a471 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/resume.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/resume.expected.md
@@ -12,6 +12,7 @@
0
+
diff --git a/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/ssr.expected.md b/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/ssr.expected.md
index 104d090d2..7fc64cf30 100644
--- a/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/ssr.expected.md
+++ b/packages/runtime-tags/src/__tests__/fixtures/walk-over-child/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
+ 0
# Render "End"
@@ -16,6 +16,7 @@
0
+
@@ -34,6 +35,7 @@ inserted #document/html0/body1/section0/span0/#text0
inserted #document/html0/body1/div1
inserted #document/html0/body1/div1/#text0
inserted #document/html0/body1/div1/#comment1
-inserted #document/html0/body1/script2
-inserted #document/html0/body1/script2/#text0
+inserted #document/html0/body1/#comment2
+inserted #document/html0/body1/script3
+inserted #document/html0/body1/script3/#text0
```
\ No newline at end of file
diff --git a/packages/runtime-tags/src/dom/queue.ts b/packages/runtime-tags/src/dom/queue.ts
index 479d5675e..df628d536 100644
--- a/packages/runtime-tags/src/dom/queue.ts
+++ b/packages/runtime-tags/src/dom/queue.ts
@@ -2,13 +2,6 @@ import type { Scope } from "../common/types";
import { schedule } from "./schedule";
import { MARK, type ValueSignal } from "./signals";
-const enum PendingSignalOffset {
- Scope = 0,
- Signal = 1,
- Value = 2,
- Total = 3,
-}
-
const enum PendingEffectOffset {
Scope = 0,
Function = 1,
@@ -16,8 +9,14 @@ const enum PendingEffectOffset {
}
type ExecFn = (scope: S, arg?: any) => void;
+type PendingSignal = {
+ ___scope: Scope;
+ ___signal: ValueSignal;
+ ___value: unknown;
+ ___next: PendingSignal | undefined;
+};
-let pendingSignals: unknown[] = [];
+let pendingSignal: PendingSignal["___next"] = undefined;
let pendingEffects: unknown[] = [];
export let rendering = false;
@@ -26,7 +25,35 @@ export function queueSource(scope: Scope, signal: ValueSignal, value: T) {
rendering = true;
signal(scope, MARK);
rendering = false;
- pendingSignals.push(scope, signal, value);
+
+ const nextSignal: PendingSignal = {
+ ___scope: scope,
+ ___signal: signal,
+ ___value: value,
+ ___next: undefined,
+ };
+
+ if (!pendingSignal) {
+ pendingSignal = nextSignal;
+ } else if (
+ sortScopeByDOMPosition(pendingSignal.___scope, nextSignal.___scope) < 0
+ ) {
+ nextSignal.___next = pendingSignal;
+ pendingSignal = nextSignal;
+ } else {
+ let currentSignal = pendingSignal;
+ while (
+ currentSignal.___next &&
+ sortScopeByDOMPosition(
+ currentSignal.___next.___scope,
+ nextSignal.___scope,
+ ) <= 0
+ ) {
+ currentSignal = currentSignal.___next;
+ }
+ nextSignal.___next = currentSignal.___next;
+ currentSignal.___next = nextSignal;
+ }
return value;
}
@@ -38,13 +65,12 @@ export function queueEffect>(
}
export function run() {
- const signals = pendingSignals;
const effects = pendingEffects;
try {
rendering = true;
- pendingSignals = [];
- runSignals(signals);
+ runSignals();
} finally {
+ pendingSignal = undefined;
rendering = false;
}
pendingEffects = [];
@@ -52,18 +78,17 @@ export function run() {
}
export function prepareEffects(fn: () => void): unknown[] {
- const prevSignals = pendingSignals;
+ const prevSignals = pendingSignal;
const prevEffects = pendingEffects;
const preparedEffects = (pendingEffects = []);
- const preparedSignals = (pendingSignals = []);
try {
rendering = true;
+ pendingSignal = undefined;
fn();
- pendingSignals = prevSignals;
- runSignals(preparedSignals);
+ runSignals();
} finally {
rendering = false;
- pendingSignals = prevSignals;
+ pendingSignal = prevSignals;
pendingEffects = prevEffects;
}
return preparedEffects;
@@ -77,11 +102,35 @@ export function runEffects(effects: unknown[] = pendingEffects) {
}
}
-function runSignals(signals: unknown[]) {
- for (let i = 0; i < signals.length; i += PendingSignalOffset.Total) {
- const scope = signals[i + PendingSignalOffset.Scope] as Scope;
- const signal = signals[i + PendingSignalOffset.Signal] as ValueSignal;
- const value = signals[i + PendingSignalOffset.Value] as unknown;
- signal(scope, value);
+function runSignals() {
+ while (pendingSignal) {
+ if (scopeIsConnected(pendingSignal.___scope)) {
+ pendingSignal.___signal(pendingSignal.___scope, pendingSignal.___value);
+ }
+ pendingSignal = pendingSignal.___next;
}
}
+
+function scopeIsConnected(scope: Scope) {
+ const start = ownerStartNode(scope);
+ return start ? start.isConnected : true;
+}
+
+function sortScopeByDOMPosition(a: Scope, b: Scope) {
+ const aStart = ownerStartNode(a);
+ const bStart = ownerStartNode(b);
+ return aStart === bStart
+ ? 0
+ : aStart
+ ? bStart
+ ? aStart.compareDocumentPosition(bStart) &
+ 2 /* Node.DOCUMENT_POSITION_PRECEDING */
+ ? -1
+ : 1
+ : -1
+ : 1;
+}
+
+function ownerStartNode(scope: Scope): (Node & ChildNode) | undefined {
+ return (scope.___cleanupOwner || scope).___startNode;
+}
diff --git a/packages/runtime-tags/src/html/writer.ts b/packages/runtime-tags/src/html/writer.ts
index 591fcf5d9..8b9064a26 100644
--- a/packages/runtime-tags/src/html/writer.ts
+++ b/packages/runtime-tags/src/html/writer.ts
@@ -141,7 +141,7 @@ export function markResumeControlSingleNodeEnd(
}
export function markResumeCleanup(scopeId: number) {
- return $chunk.boundary.state.mark(Mark.Cleanup, "" + scopeId);
+ $chunk.writeHTML($chunk.boundary.state.mark(Mark.Cleanup, "" + scopeId));
}
export function writeScope(scopeId: number, partialScope: PartialScope) {
diff --git a/packages/runtime-tags/src/translator/util/signals.ts b/packages/runtime-tags/src/translator/util/signals.ts
index 3f6640e2b..c86ee1321 100644
--- a/packages/runtime-tags/src/translator/util/signals.ts
+++ b/packages/runtime-tags/src/translator/util/signals.ts
@@ -13,7 +13,7 @@ import { forEachIdentifier } from "./for-each-identifier";
import { getDeclaredBindingExpression } from "./get-defined-binding-expression";
import { isStatefulReferences } from "./is-stateful";
import { isOutputHTML } from "./marko-config";
-import { forEach, type Opt, push } from "./optional";
+import { find, forEach, type Opt, push } from "./optional";
import {
type Binding,
BindingType,
@@ -1006,6 +1006,20 @@ export function writeHTMLResumeStatements(
);
}
+ const needsControlFlowOwner =
+ section.hasCleanup ||
+ !!section.closures ||
+ !!find(section.bindings, (binding) => binding.type === BindingType.let);
+
+ if (needsControlFlowOwner) {
+ path.pushContainer(
+ "body",
+ t.expressionStatement(
+ callRuntime("markResumeCleanup", scopeIdIdentifier),
+ ),
+ );
+ }
+
if (path.get("body").length) {
path.unshiftContainer(
"body",
diff --git a/packages/runtime-tags/src/translator/visitors/referenced-identifier.ts b/packages/runtime-tags/src/translator/visitors/referenced-identifier.ts
index 09850d745..be66094bb 100644
--- a/packages/runtime-tags/src/translator/visitors/referenced-identifier.ts
+++ b/packages/runtime-tags/src/translator/visitors/referenced-identifier.ts
@@ -3,15 +3,10 @@ import { types as t } from "@marko/compiler";
import { getExprRoot } from "../util/get-root";
import { isOutputHTML } from "../util/marko-config";
import { setReferencesScope } from "../util/references";
-import { callRuntime, importRuntime } from "../util/runtime";
-import {
- getScopeIdIdentifier,
- getSection,
- type Section,
-} from "../util/sections";
+import { importRuntime } from "../util/runtime";
+import { getOrCreateSection, getSection, type Section } from "../util/sections";
import { addStatement } from "../util/signals";
import type { TemplateVisitor } from "../util/visitors";
-import * as writer from "../util/writer";
import { scopeIdentifier } from "./program";
const abortIdsByExpressionForSection = new WeakMap<
@@ -42,7 +37,11 @@ export default {
analyze(identifier) {
const { name } = identifier.node;
if (identifier.scope.hasBinding(name)) return;
- if (name === "$global" || name === "$signal") {
+ if (name === "$global") {
+ setReferencesScope(identifier);
+ } else if (name === "$signal") {
+ const section = getOrCreateSection(identifier);
+ section.hasCleanup = true;
setReferencesScope(identifier);
}
},
@@ -63,14 +62,6 @@ export default {
break;
case "$signal":
if (isOutputHTML()) {
- const section = getSection(identifier);
- if (!section.hasCleanup) {
- section.hasCleanup = true;
- const exprRoot = getExprRoot(identifier);
- const write = writer.writeTo(exprRoot);
- write`${callRuntime("markResumeCleanup", getScopeIdIdentifier(section))}`;
- }
-
identifier.replaceWith(
t.callExpression(
t.arrowFunctionExpression(
diff --git a/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/components/custom-tag.js b/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/components/custom-tag.js
index aae59e9b7..e2bd268d2 100644
--- a/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/components/custom-tag.js
+++ b/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/html.expected/components/custom-tag.js
@@ -14,5 +14,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/3!": _$.writeExistingScope(_dynamicScope),
"#text/3(": _$.normalizeDynamicRenderer(input.content)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/components/custom-tag.marko", _renderer);
\ No newline at end of file
diff --git a/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/ssr.expected.md
index 053fca110..ae1802ba3 100644
--- a/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/ssr.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/custom-tag-parameters-from-args/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 1,10 Counts: 1,10
+ 1,10 Counts: 1,10
# Render "End"
@@ -23,6 +23,7 @@
Counts: 1,10
+
@@ -47,6 +48,7 @@ inserted #document/html0/body1/#comment2
inserted #document/html0/body1/div3
inserted #document/html0/body1/div3/#text0
inserted #document/html0/body1/#comment4
-inserted #document/html0/body1/script5
-inserted #document/html0/body1/script5/#text0
+inserted #document/html0/body1/#comment5
+inserted #document/html0/body1/script6
+inserted #document/html0/body1/script6/#text0
```
\ No newline at end of file
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/html.expected/components/tags-counter.js b/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/html.expected/components/tags-counter.js
index 940a69769..8bc3c6c7b 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/html.expected/components/tags-counter.js
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/html.expected/components/tags-counter.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/components/tags-counter.marko", _renderer);
\ No newline at end of file
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/resume.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/resume.expected.md
index 7690de3da..5d318e43e 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/resume.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/resume.expected.md
@@ -16,6 +16,7 @@
+
@@ -26,17 +27,17 @@
# Mutations
```
inserted #document/html0/body1/#text0
-inserted #document/html0/body1/#text8
+inserted #document/html0/body1/#text9
removed #comment before #document/html0/body1/#text0
-removed #comment after #document/html0/body1/#text8
+removed #comment after #document/html0/body1/#text9
inserted #document/html0/body1/#text2
-inserted #document/html0/body1/#text7
+inserted #document/html0/body1/#text8
inserted #document/html0/body1/#text3
-inserted #document/html0/body1/#text6
-removed #comment after #document/html0/body1/#text3
-removed #comment after #document/html0/body1/#comment5
-removed #document/html0/body1/#text7 after #document/html0/body1/#text6
inserted #document/html0/body1/#text7
+removed #comment after #document/html0/body1/#text3
+removed #comment after #document/html0/body1/#comment6
+removed #document/html0/body1/#text8 after #document/html0/body1/#text7
+inserted #document/html0/body1/#text8
```
@@ -60,6 +61,7 @@ container.querySelector("#tags").click()
+
@@ -93,6 +95,7 @@ container.querySelector("#class").click()
+
@@ -127,6 +130,7 @@ container.querySelector("#tags").click()
+
@@ -160,6 +164,7 @@ container.querySelector("#class").click()
+
@@ -194,6 +199,7 @@ container.querySelector("#tags").click()
+
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/ssr.expected.md
index f2489af24..c2b81afbf 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/ssr.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-basic-class-to-tags/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 0
+ 0 0
# Render "End"
@@ -22,6 +22,7 @@
+
@@ -56,6 +57,7 @@ container.querySelector("#tags").click()
0
+
@@ -92,6 +94,7 @@ container.querySelector("#class").click()
1
+
@@ -127,6 +130,7 @@ container.querySelector("#tags").click()
1
+
@@ -163,6 +167,7 @@ container.querySelector("#class").click()
2
+
@@ -198,6 +203,7 @@ container.querySelector("#tags").click()
2
+
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-basic-tags-to-class/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-basic-tags-to-class/__snapshots__/ssr.expected.md
index 592d7248a..288e02c02 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-basic-tags-to-class/__snapshots__/ssr.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-basic-tags-to-class/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 0
+ 0 0
# Render "End"
@@ -24,6 +24,7 @@
+
@@ -46,6 +47,7 @@ inserted #document/html0/body1/button4
inserted #document/html0/body1/button4/#text0
inserted #document/html0/body1/#comment5
inserted #document/html0/body1/#comment6
-inserted #document/html0/body1/script7
-inserted #document/html0/body1/script7/#text0
+inserted #document/html0/body1/#comment7
+inserted #document/html0/body1/script8
+inserted #document/html0/body1/script8/#text0
```
\ No newline at end of file
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/html.expected/components/tags-counter.js b/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/html.expected/components/tags-counter.js
index 940a69769..8bc3c6c7b 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/html.expected/components/tags-counter.js
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/html.expected/components/tags-counter.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/components/tags-counter.marko", _renderer);
\ No newline at end of file
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/resume.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/resume.expected.md
index 7690de3da..5d318e43e 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/resume.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/resume.expected.md
@@ -16,6 +16,7 @@
+
@@ -26,17 +27,17 @@
# Mutations
```
inserted #document/html0/body1/#text0
-inserted #document/html0/body1/#text8
+inserted #document/html0/body1/#text9
removed #comment before #document/html0/body1/#text0
-removed #comment after #document/html0/body1/#text8
+removed #comment after #document/html0/body1/#text9
inserted #document/html0/body1/#text2
-inserted #document/html0/body1/#text7
+inserted #document/html0/body1/#text8
inserted #document/html0/body1/#text3
-inserted #document/html0/body1/#text6
-removed #comment after #document/html0/body1/#text3
-removed #comment after #document/html0/body1/#comment5
-removed #document/html0/body1/#text7 after #document/html0/body1/#text6
inserted #document/html0/body1/#text7
+removed #comment after #document/html0/body1/#text3
+removed #comment after #document/html0/body1/#comment6
+removed #document/html0/body1/#text8 after #document/html0/body1/#text7
+inserted #document/html0/body1/#text8
```
@@ -60,6 +61,7 @@ container.querySelector("#tags").click()
+
@@ -93,6 +95,7 @@ container.querySelector("#class").click()
+
@@ -127,6 +130,7 @@ container.querySelector("#tags").click()
+
@@ -160,6 +164,7 @@ container.querySelector("#class").click()
+
@@ -194,6 +199,7 @@ container.querySelector("#tags").click()
+
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/ssr.expected.md
index f2489af24..c2b81afbf 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/ssr.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-class-to-tags-import/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 0
+ 0 0
# Render "End"
@@ -22,6 +22,7 @@
+
@@ -52,6 +53,7 @@ container.querySelector("#class-api").click()
1
+
@@ -86,6 +88,7 @@ container.querySelector("#class-api").click()
2
+
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-events-tags-to-class/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-events-tags-to-class/__snapshots__/ssr.expected.md
index a15015848..f9f7d8f2b 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-events-tags-to-class/__snapshots__/ssr.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-events-tags-to-class/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 0
+ 0 0
# Render "End"
@@ -22,6 +22,7 @@
0
+
@@ -43,6 +44,7 @@ inserted #document/html0/body1/#comment4
inserted #document/html0/body1/div5
inserted #document/html0/body1/div5/#text0
inserted #document/html0/body1/div5/#comment1
-inserted #document/html0/body1/script6
-inserted #document/html0/body1/script6/#text0
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/script7
+inserted #document/html0/body1/script7/#text0
```
\ No newline at end of file
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/html.expected/components/tags-layout.js b/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/html.expected/components/tags-layout.js
index 3ae7c2fc5..1595cba04 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/html.expected/components/tags-layout.js
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/html.expected/components/tags-layout.js
@@ -12,5 +12,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/2!": _$.writeExistingScope(_dynamicScope),
"#text/2(": _$.normalizeDynamicRenderer(input.stuff.content)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/components/tags-layout.marko", _renderer);
\ No newline at end of file
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/resume.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/resume.expected.md
index 7cde04dee..263a9f9d5 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/resume.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/resume.expected.md
@@ -18,6 +18,7 @@
+
@@ -28,21 +29,21 @@
# Mutations
```
inserted #document/html0/body1/#text0
-inserted #document/html0/body1/#text8
+inserted #document/html0/body1/#text9
removed #comment before #document/html0/body1/#text0
-removed #comment after #document/html0/body1/#text8
+removed #comment after #document/html0/body1/#text9
inserted #document/html0/body1/div5/#text0
inserted #document/html0/body1/div5/#text4
removed #comment after #document/html0/body1/div5/#text4
removed button after #document/html0/body1/div5/#text4
inserted #document/html0/body1/#text1
-inserted #document/html0/body1/#text7
+inserted #document/html0/body1/#text8
inserted #document/html0/body1/#text2
-inserted #document/html0/body1/#text6
-removed #comment after #document/html0/body1/#text2
-removed #comment after #document/html0/body1/div5
-removed #document/html0/body1/#text7 after #document/html0/body1/#text6
inserted #document/html0/body1/#text7
+removed #comment after #document/html0/body1/#text2
+removed #comment after #document/html0/body1/#comment6
+removed #document/html0/body1/#text8 after #document/html0/body1/#text7
+inserted #document/html0/body1/#text8
inserted #document/html0/body1/div5/#text1
inserted #document/html0/body1/div5/#text3
inserted #document/html0/body1/div5/button2
@@ -72,6 +73,7 @@ container.querySelector("#tags").click()
+
@@ -107,6 +109,7 @@ container.querySelector("#class").click()
+
@@ -152,6 +155,7 @@ container.querySelector("#tags").click()
+
@@ -187,6 +191,7 @@ container.querySelector("#class").click()
+
@@ -232,6 +237,7 @@ container.querySelector("#tags").click()
+
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/ssr.expected.md
index 8b610cc6b..f6ad8277f 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/ssr.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-nested-attr-tags-class-to-tags/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 0
+ 0 0
# Render "End"
@@ -25,6 +25,7 @@
+
@@ -28,21 +29,21 @@
# Mutations
```
inserted #document/html0/body1/#text0
-inserted #document/html0/body1/#text8
+inserted #document/html0/body1/#text9
removed #comment before #document/html0/body1/#text0
-removed #comment after #document/html0/body1/#text8
+removed #comment after #document/html0/body1/#text9
inserted #document/html0/body1/div5/#text0
inserted #document/html0/body1/div5/#text4
removed #comment after #document/html0/body1/div5/#text4
removed button after #document/html0/body1/div5/#text4
inserted #document/html0/body1/#text1
-inserted #document/html0/body1/#text7
+inserted #document/html0/body1/#text8
inserted #document/html0/body1/#text2
-inserted #document/html0/body1/#text6
-removed #comment after #document/html0/body1/#text2
-removed #comment after #document/html0/body1/div5
-removed #document/html0/body1/#text7 after #document/html0/body1/#text6
inserted #document/html0/body1/#text7
+removed #comment after #document/html0/body1/#text2
+removed #comment after #document/html0/body1/#comment6
+removed #document/html0/body1/#text8 after #document/html0/body1/#text7
+inserted #document/html0/body1/#text8
inserted #document/html0/body1/div5/#text1
inserted #document/html0/body1/div5/#text3
inserted #document/html0/body1/div5/button2
@@ -72,6 +73,7 @@ container.querySelector("#tags").click()
+
@@ -107,6 +109,7 @@ container.querySelector("#class").click()
+
@@ -152,6 +155,7 @@ container.querySelector("#tags").click()
+
@@ -187,6 +191,7 @@ container.querySelector("#class").click()
+
@@ -232,6 +237,7 @@ container.querySelector("#tags").click()
+
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/ssr.expected.md
index 8b610cc6b..f6ad8277f 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/ssr.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-nested-class-to-tags/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 0
+ 0 0
# Render "End"
@@ -25,6 +25,7 @@
+
@@ -33,13 +35,13 @@ inserted #document/html0/body1/#text4
removed #comment after #document/html0/body1/#comment0
removed #comment after #document/html0/body1/#text4
inserted #document/html0/body1/div3/#text0
-inserted #document/html0/body1/div3/#text5
+inserted #document/html0/body1/div3/#text6
inserted #document/html0/body1/div3/#text1
-inserted #document/html0/body1/div3/#text4
-removed #comment after #document/html0/body1/div3/#text1
-removed #comment after #document/html0/body1/div3/#comment3
-removed #document/html0/body1/div3/#text5 after #document/html0/body1/div3/#text4
inserted #document/html0/body1/div3/#text5
+removed #comment after #document/html0/body1/div3/#text1
+removed #comment after #document/html0/body1/div3/#comment4
+removed #document/html0/body1/div3/#text6 after #document/html0/body1/div3/#text5
+inserted #document/html0/body1/div3/#text6
```
@@ -64,8 +66,10 @@ container.querySelector("#tags").click()
+
+
@@ -100,8 +104,10 @@ container.querySelector("#class").click()
+
+
@@ -136,8 +142,10 @@ container.querySelector("#tags").click()
+
+
@@ -172,8 +180,10 @@ container.querySelector("#class").click()
+
+
@@ -208,8 +218,10 @@ container.querySelector("#tags").click()
+
+
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-nested-tags-to-class/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-nested-tags-to-class/__snapshots__/ssr.expected.md
index 1aa69ba6b..2ac4492cf 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-nested-tags-to-class/__snapshots__/ssr.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-nested-tags-to-class/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0 0
+ 0 0
# Render "End"
@@ -23,10 +23,12 @@
+
+
@@ -50,8 +52,10 @@ inserted #document/html0/body1/div3/button1/#text0
inserted #document/html0/body1/div3/button1/#comment1
inserted #document/html0/body1/div3/#comment2
inserted #document/html0/body1/div3/#comment3
+inserted #document/html0/body1/div3/#comment4
inserted #document/html0/body1/#comment4
inserted #document/html0/body1/#comment5
-inserted #document/html0/body1/script6
-inserted #document/html0/body1/script6/#text0
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/script7
+inserted #document/html0/body1/script7/#text0
```
\ No newline at end of file
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/html.expected/components/tags-layout.js b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/html.expected/components/tags-layout.js
index a2c515335..9d9119009 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/html.expected/components/tags-layout.js
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/html.expected/components/tags-layout.js
@@ -12,5 +12,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
"#text/2!": _$.writeExistingScope(_dynamicScope),
"#text/2(": _$.normalizeDynamicRenderer(input.content)
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/components/tags-layout.marko", _renderer);
\ No newline at end of file
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/resume.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/resume.expected.md
index 464edf01e..f20c18c65 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/resume.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/resume.expected.md
@@ -21,6 +21,7 @@
+
@@ -31,22 +32,22 @@
# Mutations
```
inserted #document/html0/body1/#text0
-inserted #document/html0/body1/#text8
+inserted #document/html0/body1/#text9
removed #comment before #document/html0/body1/#text0
-removed #comment after #document/html0/body1/#text8
+removed #comment after #document/html0/body1/#text9
inserted #document/html0/body1/div5/#text0
inserted #document/html0/body1/div5/#text5
removed #comment after #document/html0/body1/div5/#text5
removed h1 after #document/html0/body1/div5/#text5
removed button after #document/html0/body1/div5/#text5
inserted #document/html0/body1/#text1
-inserted #document/html0/body1/#text7
+inserted #document/html0/body1/#text8
inserted #document/html0/body1/#text2
-inserted #document/html0/body1/#text6
-removed #comment after #document/html0/body1/#text2
-removed #comment after #document/html0/body1/div5
-removed #document/html0/body1/#text7 after #document/html0/body1/#text6
inserted #document/html0/body1/#text7
+removed #comment after #document/html0/body1/#text2
+removed #comment after #document/html0/body1/#comment6
+removed #document/html0/body1/#text8 after #document/html0/body1/#text7
+inserted #document/html0/body1/#text8
inserted #document/html0/body1/div5/#text1
inserted #document/html0/body1/div5/#text4
inserted #document/html0/body1/div5/h12
@@ -85,6 +86,7 @@ container.querySelector("#tags").click()
+
@@ -125,6 +127,7 @@ container.querySelector("#class").click()
+
@@ -180,6 +183,7 @@ container.querySelector("#tags").click()
+
@@ -220,6 +224,7 @@ container.querySelector("#class").click()
+
@@ -275,6 +280,7 @@ container.querySelector("#tags").click()
+
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/ssr.expected.md
index 022cc1647..9d5e3903e 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/ssr.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-class-to-tags/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
hello 1 * 0 = 0
+ 0
hello 1 * 0 = 0
# Render "End"
@@ -28,6 +28,7 @@
+
@@ -45,13 +47,13 @@ inserted #document/html0/body1/#text4
removed #comment after #document/html0/body1/#comment0
removed #comment after #document/html0/body1/#text4
inserted #document/html0/body1/div3/#text0
-inserted #document/html0/body1/div3/#text6
+inserted #document/html0/body1/div3/#text7
inserted #document/html0/body1/div3/#text1
-inserted #document/html0/body1/div3/#text5
-removed #comment after #document/html0/body1/div3/#text1
-removed #comment after #document/html0/body1/div3/#comment4
-removed #document/html0/body1/div3/#text6 after #document/html0/body1/div3/#text5
inserted #document/html0/body1/div3/#text6
+removed #comment after #document/html0/body1/div3/#text1
+removed #comment after #document/html0/body1/div3/#comment5
+removed #document/html0/body1/div3/#text7 after #document/html0/body1/div3/#text6
+inserted #document/html0/body1/div3/#text7
```
@@ -88,8 +90,10 @@ container.querySelector("#tags").click()
+
+
@@ -136,8 +140,10 @@ container.querySelector("#class").click()
+
+
@@ -186,8 +192,10 @@ container.querySelector("#tags").click()
+
+
@@ -235,8 +243,10 @@ container.querySelector("#class").click()
+
+
@@ -285,8 +295,10 @@ container.querySelector("#tags").click()
+
+
diff --git a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-tags-to-class/__snapshots__/ssr.expected.md b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-tags-to-class/__snapshots__/ssr.expected.md
index c85aec8e0..4910cfbb0 100644
--- a/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-tags-to-class/__snapshots__/ssr.expected.md
+++ b/packages/translator-interop/src/__tests__/fixtures/interop-tag-params-tags-to-class/__snapshots__/ssr.expected.md
@@ -1,5 +1,5 @@
# Write
- 0
hello 1 * 0 = 0
+ 0
hello 1 * 0 = 0
# Render "End"
@@ -35,10 +35,12 @@
+
+
@@ -73,8 +75,10 @@ inserted #document/html0/body1/div3/button2/#text8
inserted #document/html0/body1/div3/button2/#comment9
inserted #document/html0/body1/div3/#comment3
inserted #document/html0/body1/div3/#comment4
+inserted #document/html0/body1/div3/#comment5
inserted #document/html0/body1/#comment4
inserted #document/html0/body1/#comment5
-inserted #document/html0/body1/script6
-inserted #document/html0/body1/script6/#text0
+inserted #document/html0/body1/#comment6
+inserted #document/html0/body1/script7
+inserted #document/html0/body1/script7/#text0
```
\ No newline at end of file
diff --git a/packages/translator-interop/src/__tests__/fixtures/let/__snapshots__/html.expected/template.js b/packages/translator-interop/src/__tests__/fixtures/let/__snapshots__/html.expected/template.js
index 2c4d54d51..6cc7666e0 100644
--- a/packages/translator-interop/src/__tests__/fixtures/let/__snapshots__/html.expected/template.js
+++ b/packages/translator-interop/src/__tests__/fixtures/let/__snapshots__/html.expected/template.js
@@ -7,5 +7,6 @@ const _renderer = /* @__PURE__ */_$.createRenderer((input, _tagVar) => {
_$.writeScope(_scope0_id, {
"count": count
});
+ _$.markResumeCleanup(_scope0_id);
});
export default /* @__PURE__ */_$.createTemplate("__tests__/template.marko", _renderer);
\ No newline at end of file