expand test to set stage for inlining text nodes

hoist-unmodified-var
Ben McCann 2 years ago
parent fcb076b6c1
commit 098462d6ea

@ -7,14 +7,16 @@ const autocapitalize = 'words';
import * as $ from "svelte/internal";
const boolean = false;
var frag = $.template(`<p autocapitalize="${autocapitalize}" contenteditable="${boolean}">hello world</p>`);
var frag = $.template(`<p autocapitalize="${autocapitalize}" contenteditable="${boolean}"> </p>`);
export default function Hoist_unmodified_var($$anchor, $$props) {
$.push($$props, true);
/* Init */
var p = $.open($$anchor, true, frag);
var text = $.child(p);
text.nodeValue = `boolean is ${$.stringify(boolean)} and autocapitalize is $${$.stringify(autocapitalize)}`;
$.close($$anchor, p);
$.pop();
}
}

@ -9,6 +9,6 @@ export default function Hoist_unmodified_var($$payload, $$props) {
let boolean = false;
$$payload.out += `<p${$.attr("autocapitalize", autocapitalize, false)}${$.attr("contenteditable", boolean, false)}>hello world</p>`;
$$payload.out += `<p${$.attr("autocapitalize", autocapitalize, false)}${$.attr("contenteditable", boolean, false)}>boolean is ${$.escape(boolean)} and autocapitalize is $${$.escape(autocapitalize)}</p>`;
$.pop();
}
}

@ -8,4 +8,4 @@
let boolean = false;
</script>
<p {autocapitalize} contenteditable={boolean}>hello world</p>
<p {autocapitalize} contenteditable={boolean}>boolean is {boolean} and autocapitalize is ${autocapitalize}</p>

Loading…
Cancel
Save