diff --git a/src/compile/dom/Block.ts b/src/compile/dom/Block.ts index 977486bd8d..ca3984b5d7 100644 --- a/src/compile/dom/Block.ts +++ b/src/compile/dom/Block.ts @@ -120,10 +120,10 @@ export default class Block { this.builders.claim.addLine(`${name} = ${claimStatement || renderStatement};`); if (parentNode) { - this.builders.mount.addLine(`@appendNode(${name}, ${parentNode});`); + this.builders.mount.addLine(`@append(${parentNode}, ${name});`); if (parentNode === 'document.head') this.builders.destroy.addLine(`@detachNode(${name});`); } else { - this.builders.mount.addLine(`@insertNode(${name}, #target, anchor);`); + this.builders.mount.addLine(`@insert(#target, ${name}, anchor);`); if (!noDetach) this.builders.destroy.addConditional('detach', `@detachNode(${name});`); } } diff --git a/src/compile/dom/index.ts b/src/compile/dom/index.ts index 1eada67e9e..d66b54ec14 100644 --- a/src/compile/dom/index.ts +++ b/src/compile/dom/index.ts @@ -117,7 +117,7 @@ export default function dom( var style = @createElement("style"); style.id = '${compiler.stylesheet.id}-style'; style.textContent = ${styles}; - @appendNode(style, document.head); + @append(document.head, style); } `); } diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts index 403b9cce8b..7ab49b9768 100644 --- a/src/compile/nodes/Element.ts +++ b/src/compile/nodes/Element.ts @@ -288,14 +288,14 @@ export default class Element extends Node { if (initialMountNode) { block.builders.mount.addLine( - `@appendNode(${node}, ${initialMountNode});` + `@append(${initialMountNode}, ${node});` ); if (initialMountNode === 'document.head') { block.builders.destroy.addLine(`@detachNode(${node});`); } } else { - block.builders.mount.addLine(`@insertNode(${node}, #target, anchor);`); + block.builders.mount.addLine(`@insert(#target, ${node}, anchor);`); // TODO we eventually need to consider what happens to elements // that belong to the same outgroup as an outroing element... @@ -854,10 +854,10 @@ export default class Element extends Node { const slot = this.attributes.find(attribute => attribute.name === 'slot'); if (slot) { const prop = quotePropIfNecessary(slot.chunks[0].data); - return `@appendNode(${this.var}, ${name}._slotted${prop});`; + return `@append(${name}._slotted${prop}, ${this.var});`; } - return `@appendNode(${this.var}, ${name}._slotted.default);`; + return `@append(${name}._slotted.default, ${this.var});`; } addCssClass(className = this.compiler.stylesheet.id) { diff --git a/src/compile/nodes/MustacheTag.ts b/src/compile/nodes/MustacheTag.ts index 630aebb41b..f67ac5b64d 100644 --- a/src/compile/nodes/MustacheTag.ts +++ b/src/compile/nodes/MustacheTag.ts @@ -22,7 +22,7 @@ export default class MustacheTag extends Tag { } remount(name: string) { - return `@appendNode(${this.var}, ${name}._slotted.default);`; + return `@append(${name}._slotted.default, ${this.var});`; } ssr() { diff --git a/src/compile/nodes/RawMustacheTag.ts b/src/compile/nodes/RawMustacheTag.ts index 2e65b21fed..f50f1e6a31 100644 --- a/src/compile/nodes/RawMustacheTag.ts +++ b/src/compile/nodes/RawMustacheTag.ts @@ -91,7 +91,7 @@ export default class RawMustacheTag extends Tag { } remount(name: string) { - return `@appendNode(${this.var}, ${name}._slotted.default);`; + return `@append(${name}._slotted.default, ${this.var});`; } ssr() { diff --git a/src/compile/nodes/Slot.ts b/src/compile/nodes/Slot.ts index 4fe44f0710..bfbf4254b1 100644 --- a/src/compile/nodes/Slot.ts +++ b/src/compile/nodes/Slot.ts @@ -85,17 +85,17 @@ export default class Slot extends Element { if (parentNode) { block.builders.mount.addBlock(deindent` ${mountLeadin} { - ${needsAnchorBefore && `@appendNode(${anchorBefore} || (${anchorBefore} = @createComment()), ${parentNode});`} - @appendNode(${content_name}, ${parentNode}); - ${needsAnchorAfter && `@appendNode(${anchorAfter} || (${anchorAfter} = @createComment()), ${parentNode});`} + ${needsAnchorBefore && `@append(${parentNode}, ${anchorBefore} || (${anchorBefore} = @createComment()));`} + @append(${parentNode}, ${content_name}); + ${needsAnchorAfter && `@append(${parentNode}, ${anchorAfter} || (${anchorAfter} = @createComment()));`} } `); } else { block.builders.mount.addBlock(deindent` ${mountLeadin} { - ${needsAnchorBefore && `@insertNode(${anchorBefore} || (${anchorBefore} = @createComment()), #target, anchor);`} - @insertNode(${content_name}, #target, anchor); - ${needsAnchorAfter && `@insertNode(${anchorAfter} || (${anchorAfter} = @createComment()), #target, anchor);`} + ${needsAnchorBefore && `@insert(#target, ${anchorBefore} || (${anchorBefore} = @createComment()), anchor);`} + @insert(#target, ${content_name}, anchor); + ${needsAnchorAfter && `@insert(#target, ${anchorAfter} || (${anchorAfter} = @createComment()), anchor);`} } `); } diff --git a/src/compile/nodes/Text.ts b/src/compile/nodes/Text.ts index d1a5a1d2d4..bba5b2848b 100644 --- a/src/compile/nodes/Text.ts +++ b/src/compile/nodes/Text.ts @@ -9,10 +9,8 @@ const elementsWithoutText = new Set([ 'audio', 'datalist', 'dl', - 'ol', 'optgroup', 'select', - 'ul', 'video', ]); @@ -39,8 +37,6 @@ export default class Text extends Node { } init(block: Block) { - const parentElement = this.findNearest(/(?:Element|Component)/); - if (shouldSkip(this)) { this.shouldSkip = true; return; @@ -65,7 +61,7 @@ export default class Text extends Node { } remount(name: string) { - return `@appendNode(${this.var}, ${name}._slotted.default);`; + return `@append(${name}._slotted.default, ${this.var});`; } ssr() { diff --git a/src/shared/dom.js b/src/shared/dom.js index 3b823cfaae..06b69ba217 100644 --- a/src/shared/dom.js +++ b/src/shared/dom.js @@ -1,8 +1,8 @@ -export function appendNode(node, target) { +export function append(target, node) { target.appendChild(node); } -export function insertNode(node, target, anchor) { +export function insert(target, node, anchor) { target.insertBefore(node, anchor); } diff --git a/test/cli/samples/basic/expected/Main.js b/test/cli/samples/basic/expected/Main.js index 920f6a2f44..67af2d675a 100644 --- a/test/cli/samples/basic/expected/Main.js +++ b/test/cli/samples/basic/expected/Main.js @@ -10,7 +10,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, p: noop, @@ -53,7 +53,7 @@ function createElement(name) { return document.createElement(name); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } diff --git a/test/cli/samples/custom-element/expected/Main.js b/test/cli/samples/custom-element/expected/Main.js index 659e76fbca..0a72476e01 100644 --- a/test/cli/samples/custom-element/expected/Main.js +++ b/test/cli/samples/custom-element/expected/Main.js @@ -11,7 +11,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, p: noop, @@ -76,7 +76,7 @@ function createElement(name) { function noop() {} -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } diff --git a/test/cli/samples/dev/expected/Main.js b/test/cli/samples/dev/expected/Main.js index 38d5f44d11..d342cfb2db 100644 --- a/test/cli/samples/dev/expected/Main.js +++ b/test/cli/samples/dev/expected/Main.js @@ -13,8 +13,8 @@ function create_main_fragment(component, ctx) { }, m: function mount(target, anchor) { - insertNode(p, target, anchor); - appendNode(text, p); + insert(target, p, anchor); + append(p, text); }, p: noop, @@ -73,11 +73,11 @@ function addLoc(element, file, line, column, char) { }; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } diff --git a/test/cli/samples/dir-sourcemap/expected/Widget.js b/test/cli/samples/dir-sourcemap/expected/Widget.js index 786784b6fa..bb77a8bd13 100644 --- a/test/cli/samples/dir-sourcemap/expected/Widget.js +++ b/test/cli/samples/dir-sourcemap/expected/Widget.js @@ -10,7 +10,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, p: noop, @@ -53,7 +53,7 @@ function createElement(name) { return document.createElement(name); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } diff --git a/test/cli/samples/dir-subdir/expected/widget/Widget.js b/test/cli/samples/dir-subdir/expected/widget/Widget.js index f192602d16..e368f4d9b6 100644 --- a/test/cli/samples/dir-subdir/expected/widget/Widget.js +++ b/test/cli/samples/dir-subdir/expected/widget/Widget.js @@ -10,7 +10,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, p: noop, @@ -53,7 +53,7 @@ function createElement(name) { return document.createElement(name); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } diff --git a/test/cli/samples/dir/expected/Widget.js b/test/cli/samples/dir/expected/Widget.js index 41e573ce5e..91d975a48f 100644 --- a/test/cli/samples/dir/expected/Widget.js +++ b/test/cli/samples/dir/expected/Widget.js @@ -10,7 +10,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, p: noop, @@ -53,7 +53,7 @@ function createElement(name) { return document.createElement(name); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } diff --git a/test/cli/samples/globals/expected/Main.js b/test/cli/samples/globals/expected/Main.js index 3e7b3b95b0..5f5b5093f4 100644 --- a/test/cli/samples/globals/expected/Main.js +++ b/test/cli/samples/globals/expected/Main.js @@ -19,9 +19,9 @@ var Main = (function(answer) { "use strict"; }, m(target, anchor) { - insertNode(p, target, anchor); - appendNode(text, p); - appendNode(text_1, p); + insert(target, p, anchor); + append(p, text); + append(p, text_1); }, p(changed, ctx) { @@ -72,11 +72,11 @@ var Main = (function(answer) { "use strict"; return document.createTextNode(data); } - function insertNode(node, target, anchor) { + function insert(target, node, anchor) { target.insertBefore(node, anchor); } - function appendNode(node, target) { + function append(target, node) { target.appendChild(node); } diff --git a/test/cli/samples/sourcemap-inline/expected/Main.js b/test/cli/samples/sourcemap-inline/expected/Main.js index 010be62a1b..248b810373 100644 --- a/test/cli/samples/sourcemap-inline/expected/Main.js +++ b/test/cli/samples/sourcemap-inline/expected/Main.js @@ -10,7 +10,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, p: noop, @@ -53,7 +53,7 @@ function createElement(name) { return document.createElement(name); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } diff --git a/test/cli/samples/sourcemap/expected/Main.js b/test/cli/samples/sourcemap/expected/Main.js index 49f6094890..59ed9b7367 100644 --- a/test/cli/samples/sourcemap/expected/Main.js +++ b/test/cli/samples/sourcemap/expected/Main.js @@ -10,7 +10,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, p: noop, @@ -53,7 +53,7 @@ function createElement(name) { return document.createElement(name); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } diff --git a/test/cli/samples/store/expected/Main.js b/test/cli/samples/store/expected/Main.js index 0042c82b4b..ef8e170b39 100644 --- a/test/cli/samples/store/expected/Main.js +++ b/test/cli/samples/store/expected/Main.js @@ -11,9 +11,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(h1, target, anchor); - appendNode(text, h1); - appendNode(text_1, h1); + insert(target, h1, anchor); + append(h1, text); + append(h1, text_1); }, p(changed, ctx) { @@ -67,11 +67,11 @@ function createText(data) { return document.createTextNode(data); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } diff --git a/test/js/samples/action/expected-bundle.js b/test/js/samples/action/expected-bundle.js index f47b987f6e..d47781ac82 100644 --- a/test/js/samples/action/expected-bundle.js +++ b/test/js/samples/action/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -159,7 +159,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(a, target, anchor); + insert(target, a, anchor); }, p: noop, diff --git a/test/js/samples/action/expected.js b/test/js/samples/action/expected.js index 3fd7e9eec8..cb03f97b8d 100644 --- a/test/js/samples/action/expected.js +++ b/test/js/samples/action/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; +import { assign, createElement, detachNode, init, insert, noop, proto } from "svelte/shared.js"; function link(node) { @@ -29,7 +29,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(a, target, anchor); + insert(target, a, anchor); }, p: noop, diff --git a/test/js/samples/bind-width-height/expected-bundle.js b/test/js/samples/bind-width-height/expected-bundle.js index 9dbbfca14d..1f7abd7812 100644 --- a/test/js/samples/bind-width-height/expected-bundle.js +++ b/test/js/samples/bind-width-height/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -179,7 +179,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); div_resize_listener = addResizeListener(div, div_resize_handler); }, diff --git a/test/js/samples/bind-width-height/expected.js b/test/js/samples/bind-width-height/expected.js index ea9542acf2..5f0990fa00 100644 --- a/test/js/samples/bind-width-height/expected.js +++ b/test/js/samples/bind-width-height/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { addResizeListener, assign, callAll, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; +import { addResizeListener, assign, callAll, createElement, detachNode, init, insert, noop, proto } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var div, div_resize_listener; @@ -16,7 +16,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); div_resize_listener = addResizeListener(div, div_resize_handler); }, diff --git a/test/js/samples/collapses-text-around-comments/expected-bundle.js b/test/js/samples/collapses-text-around-comments/expected-bundle.js index 32e1f8f204..3c2ccba90e 100644 --- a/test/js/samples/collapses-text-around-comments/expected-bundle.js +++ b/test/js/samples/collapses-text-around-comments/expected-bundle.js @@ -5,11 +5,11 @@ function assign(tar, src) { return tar; } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -151,7 +151,7 @@ function add_css() { var style = createElement("style"); style.id = 'svelte-1a7i8ec-style'; style.textContent = "p.svelte-1a7i8ec{color:red}"; - appendNode(style, document.head); + append(document.head, style); } function create_main_fragment(component, ctx) { @@ -165,8 +165,8 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); - appendNode(text, p); + insert(target, p, anchor); + append(p, text); }, p(changed, ctx) { diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index d9b9c40729..93ae37f843 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, createElement, createText, detachNode, init, insertNode, proto, setData } from "svelte/shared.js"; +import { append, assign, createElement, createText, detachNode, init, insert, proto, setData } from "svelte/shared.js"; function data() { return { foo: 42 } @@ -9,7 +9,7 @@ function add_css() { var style = createElement("style"); style.id = 'svelte-1a7i8ec-style'; style.textContent = "p.svelte-1a7i8ec{color:red}"; - appendNode(style, document.head); + append(document.head, style); } function create_main_fragment(component, ctx) { @@ -23,8 +23,8 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); - appendNode(text, p); + insert(target, p, anchor); + append(p, text); }, p(changed, ctx) { diff --git a/test/js/samples/css-media-query/expected-bundle.js b/test/js/samples/css-media-query/expected-bundle.js index aa5d7f27e8..f3d74e22d2 100644 --- a/test/js/samples/css-media-query/expected-bundle.js +++ b/test/js/samples/css-media-query/expected-bundle.js @@ -5,11 +5,11 @@ function assign(tar, src) { return tar; } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -140,7 +140,7 @@ function add_css() { var style = createElement("style"); style.id = 'svelte-1slhpfn-style'; style.textContent = "@media(min-width: 1px){div.svelte-1slhpfn{color:red}}"; - appendNode(style, document.head); + append(document.head, style); } function create_main_fragment(component, ctx) { @@ -153,7 +153,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); }, p: noop, diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index 748f8ceec9..95180bc7da 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -1,11 +1,11 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; +import { append, assign, createElement, detachNode, init, insert, noop, proto } from "svelte/shared.js"; function add_css() { var style = createElement("style"); style.id = 'svelte-1slhpfn-style'; style.textContent = "@media(min-width: 1px){div.svelte-1slhpfn{color:red}}"; - appendNode(style, document.head); + append(document.head, style); } function create_main_fragment(component, ctx) { @@ -18,7 +18,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); }, p: noop, diff --git a/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js b/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js index d2a6b25d7b..4fe3a903fc 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -143,7 +143,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); }, p: noop, diff --git a/test/js/samples/css-shadow-dom-keyframes/expected.js b/test/js/samples/css-shadow-dom-keyframes/expected.js index 783a296170..e9375bf007 100644 --- a/test/js/samples/css-shadow-dom-keyframes/expected.js +++ b/test/js/samples/css-shadow-dom-keyframes/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; +import { assign, createElement, detachNode, init, insert, noop, proto } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var div; @@ -12,7 +12,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); }, p: noop, diff --git a/test/js/samples/deconflict-builtins/expected-bundle.js b/test/js/samples/deconflict-builtins/expected-bundle.js index a5b88693fc..ead082d78f 100644 --- a/test/js/samples/deconflict-builtins/expected-bundle.js +++ b/test/js/samples/deconflict-builtins/expected-bundle.js @@ -5,11 +5,11 @@ function assign(tar, src) { return tar; } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -179,7 +179,7 @@ function create_main_fragment(component, ctx) { each_blocks[i].m(target, anchor); } - insertNode(each_anchor, target, anchor); + insert(target, each_anchor, anchor); }, p(changed, ctx) { @@ -226,8 +226,8 @@ function create_each_block(component, ctx) { }, m(target, anchor) { - insertNode(span, target, anchor); - appendNode(text, span); + insert(target, span, anchor); + append(span, text); }, p(changed, ctx) { diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index 343a0ffcbc..f754bdc5ad 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, createComment, createElement, createText, destroyEach, detachNode, init, insertNode, proto, setData } from "svelte/shared.js"; +import { append, assign, createComment, createElement, createText, destroyEach, detachNode, init, insert, proto, setData } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var each_anchor; @@ -26,7 +26,7 @@ function create_main_fragment(component, ctx) { each_blocks[i].m(target, anchor); } - insertNode(each_anchor, target, anchor); + insert(target, each_anchor, anchor); }, p(changed, ctx) { @@ -73,8 +73,8 @@ function create_each_block(component, ctx) { }, m(target, anchor) { - insertNode(span, target, anchor); - appendNode(text, span); + insert(target, span, anchor); + append(span, text); }, p(changed, ctx) { diff --git a/test/js/samples/dev-warning-missing-data-computed/expected-bundle.js b/test/js/samples/dev-warning-missing-data-computed/expected-bundle.js index d30075c63f..0887f42612 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected-bundle.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected-bundle.js @@ -11,11 +11,11 @@ function addLoc(element, file, line, column, char) { }; } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -187,10 +187,10 @@ function create_main_fragment(component, ctx) { }, m: function mount(target, anchor) { - insertNode(p, target, anchor); - appendNode(text, p); - appendNode(text_1, p); - appendNode(text_2, p); + insert(target, p, anchor); + append(p, text); + append(p, text_1); + append(p, text_2); }, p: function update(changed, ctx) { diff --git a/test/js/samples/dev-warning-missing-data-computed/expected.js b/test/js/samples/dev-warning-missing-data-computed/expected.js index c71193e644..e962041f2a 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { addLoc, appendNode, assign, createElement, createText, detachNode, init, insertNode, protoDev, setData } from "svelte/shared.js"; +import { addLoc, append, assign, createElement, createText, detachNode, init, insert, protoDev, setData } from "svelte/shared.js"; function bar({ foo }) { return foo * 2; @@ -20,10 +20,10 @@ function create_main_fragment(component, ctx) { }, m: function mount(target, anchor) { - insertNode(p, target, anchor); - appendNode(text, p); - appendNode(text_1, p); - appendNode(text_2, p); + insert(target, p, anchor); + append(p, text); + append(p, text_1); + append(p, text_2); }, p: function update(changed, ctx) { diff --git a/test/js/samples/do-use-dataset/expected-bundle.js b/test/js/samples/do-use-dataset/expected-bundle.js index 04c620a5af..b9e7b56265 100644 --- a/test/js/samples/do-use-dataset/expected-bundle.js +++ b/test/js/samples/do-use-dataset/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -149,9 +149,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); - insertNode(text, target, anchor); - insertNode(div_1, target, anchor); + insert(target, div, anchor); + insert(target, text, anchor); + insert(target, div_1, anchor); }, p(changed, ctx) { diff --git a/test/js/samples/do-use-dataset/expected.js b/test/js/samples/do-use-dataset/expected.js index 1094e5ef01..29340df872 100644 --- a/test/js/samples/do-use-dataset/expected.js +++ b/test/js/samples/do-use-dataset/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, createElement, createText, detachNode, init, insertNode, proto } from "svelte/shared.js"; +import { assign, createElement, createText, detachNode, init, insert, proto } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var div, text, div_1; @@ -14,9 +14,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); - insertNode(text, target, anchor); - insertNode(div_1, target, anchor); + insert(target, div, anchor); + insert(target, text, anchor); + insert(target, div_1, anchor); }, p(changed, ctx) { diff --git a/test/js/samples/dont-use-dataset-in-legacy/expected-bundle.js b/test/js/samples/dont-use-dataset-in-legacy/expected-bundle.js index d06c76d74f..30890b83a3 100644 --- a/test/js/samples/dont-use-dataset-in-legacy/expected-bundle.js +++ b/test/js/samples/dont-use-dataset-in-legacy/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -153,9 +153,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); - insertNode(text, target, anchor); - insertNode(div_1, target, anchor); + insert(target, div, anchor); + insert(target, text, anchor); + insert(target, div_1, anchor); }, p(changed, ctx) { diff --git a/test/js/samples/dont-use-dataset-in-legacy/expected.js b/test/js/samples/dont-use-dataset-in-legacy/expected.js index b8ad61d4c7..3d7082ac66 100644 --- a/test/js/samples/dont-use-dataset-in-legacy/expected.js +++ b/test/js/samples/dont-use-dataset-in-legacy/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, createElement, createText, detachNode, init, insertNode, proto, setAttribute } from "svelte/shared.js"; +import { assign, createElement, createText, detachNode, init, insert, proto, setAttribute } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var div, text, div_1; @@ -14,9 +14,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); - insertNode(text, target, anchor); - insertNode(div_1, target, anchor); + insert(target, div, anchor); + insert(target, text, anchor); + insert(target, div_1, anchor); }, p(changed, ctx) { diff --git a/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js b/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js index 5f5f0b5e50..9c006e2870 100644 --- a/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js +++ b/test/js/samples/dont-use-dataset-in-svg/expected-bundle.js @@ -5,11 +5,11 @@ function assign(tar, src) { return tar; } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -153,9 +153,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(svg, target, anchor); - appendNode(g, svg); - appendNode(g_1, svg); + insert(target, svg, anchor); + append(svg, g); + append(svg, g_1); }, p(changed, ctx) { diff --git a/test/js/samples/dont-use-dataset-in-svg/expected.js b/test/js/samples/dont-use-dataset-in-svg/expected.js index 1d78f5ee2f..3ee274569b 100644 --- a/test/js/samples/dont-use-dataset-in-svg/expected.js +++ b/test/js/samples/dont-use-dataset-in-svg/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, createSvgElement, detachNode, init, insertNode, proto, setAttribute } from "svelte/shared.js"; +import { append, assign, createSvgElement, detachNode, init, insert, proto, setAttribute } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var svg, g, g_1; @@ -14,9 +14,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(svg, target, anchor); - appendNode(g, svg); - appendNode(g_1, svg); + insert(target, svg, anchor); + append(svg, g); + append(svg, g_1); }, p(changed, ctx) { diff --git a/test/js/samples/each-block-changed-check/expected-bundle.js b/test/js/samples/each-block-changed-check/expected-bundle.js index 23b20e5e21..01fb8671ce 100644 --- a/test/js/samples/each-block-changed-check/expected-bundle.js +++ b/test/js/samples/each-block-changed-check/expected-bundle.js @@ -5,11 +5,11 @@ function assign(tar, src) { return tar; } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -183,9 +183,9 @@ function create_main_fragment(component, ctx) { each_blocks[i].m(target, anchor); } - insertNode(text, target, anchor); - insertNode(p, target, anchor); - appendNode(text_1, p); + insert(target, text, anchor); + insert(target, p, anchor); + append(p, text_1); }, p(changed, ctx) { @@ -248,17 +248,17 @@ function create_each_block(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); - appendNode(strong, div); - appendNode(text, strong); - appendNode(text_1, div); - appendNode(span, div); - appendNode(text_2, span); - appendNode(text_3, span); - appendNode(text_4, span); - appendNode(text_5, span); - appendNode(text_6, div); - appendNode(raw_before, div); + insert(target, div, anchor); + append(div, strong); + append(strong, text); + append(div, text_1); + append(div, span); + append(span, text_2); + append(span, text_3); + append(span, text_4); + append(span, text_5); + append(div, text_6); + append(div, raw_before); raw_before.insertAdjacentHTML("afterend", raw_value); }, diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index 07dc9d2013..20d7ebaa8d 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insertNode, proto, setData } from "svelte/shared.js"; +import { append, assign, createElement, createText, destroyEach, detachAfter, detachNode, init, insert, proto, setData } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var text, p, text_1; @@ -28,9 +28,9 @@ function create_main_fragment(component, ctx) { each_blocks[i].m(target, anchor); } - insertNode(text, target, anchor); - insertNode(p, target, anchor); - appendNode(text_1, p); + insert(target, text, anchor); + insert(target, p, anchor); + append(p, text_1); }, p(changed, ctx) { @@ -93,17 +93,17 @@ function create_each_block(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); - appendNode(strong, div); - appendNode(text, strong); - appendNode(text_1, div); - appendNode(span, div); - appendNode(text_2, span); - appendNode(text_3, span); - appendNode(text_4, span); - appendNode(text_5, span); - appendNode(text_6, div); - appendNode(raw_before, div); + insert(target, div, anchor); + append(div, strong); + append(strong, text); + append(div, text_1); + append(div, span); + append(span, text_2); + append(span, text_3); + append(span, text_4); + append(span, text_5); + append(div, text_6); + append(div, raw_before); raw_before.insertAdjacentHTML("afterend", raw_value); }, diff --git a/test/js/samples/each-block-keyed-animated/expected-bundle.js b/test/js/samples/each-block-keyed-animated/expected-bundle.js index c4fd56c1ff..57ba9366ab 100644 --- a/test/js/samples/each-block-keyed-animated/expected-bundle.js +++ b/test/js/samples/each-block-keyed-animated/expected-bundle.js @@ -5,11 +5,11 @@ function assign(tar, src) { return tar; } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -495,7 +495,7 @@ function create_main_fragment(component, ctx) { m(target, anchor) { for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor); - insertNode(each_anchor, target, anchor); + insert(target, each_anchor, anchor); }, p(changed, ctx) { @@ -531,8 +531,8 @@ function create_each_block(component, key_1, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); - appendNode(text, div); + insert(target, div, anchor); + append(div, text); }, p(changed, ctx) { diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js index c47b896a5e..5b31c10827 100644 --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, blankObject, createComment, createElement, createText, detachNode, fixAndOutroAndDestroyBlock, fixPosition, init, insertNode, proto, setData, updateKeyedEach, wrapAnimation } from "svelte/shared.js"; +import { append, assign, blankObject, createComment, createElement, createText, detachNode, fixAndOutroAndDestroyBlock, fixPosition, init, insert, proto, setData, updateKeyedEach, wrapAnimation } from "svelte/shared.js"; function foo(node, animation, params) { const dx = animation.from.left - animation.to.left; @@ -38,7 +38,7 @@ function create_main_fragment(component, ctx) { m(target, anchor) { for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor); - insertNode(each_anchor, target, anchor); + insert(target, each_anchor, anchor); }, p(changed, ctx) { @@ -74,8 +74,8 @@ function create_each_block(component, key_1, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); - appendNode(text, div); + insert(target, div, anchor); + append(div, text); }, p(changed, ctx) { diff --git a/test/js/samples/each-block-keyed/expected-bundle.js b/test/js/samples/each-block-keyed/expected-bundle.js index 075112f47f..7242dc98ba 100644 --- a/test/js/samples/each-block-keyed/expected-bundle.js +++ b/test/js/samples/each-block-keyed/expected-bundle.js @@ -5,11 +5,11 @@ function assign(tar, src) { return tar; } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -262,7 +262,7 @@ function create_main_fragment(component, ctx) { m(target, anchor) { for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor); - insertNode(each_anchor, target, anchor); + insert(target, each_anchor, anchor); }, p(changed, ctx) { @@ -296,8 +296,8 @@ function create_each_block(component, key_1, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); - appendNode(text, div); + insert(target, div, anchor); + append(div, text); }, p(changed, ctx) { diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js index 715e1f8c5c..7cd4b55aba 100644 --- a/test/js/samples/each-block-keyed/expected.js +++ b/test/js/samples/each-block-keyed/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, blankObject, createComment, createElement, createText, destroyBlock, detachNode, init, insertNode, proto, setData, updateKeyedEach } from "svelte/shared.js"; +import { append, assign, blankObject, createComment, createElement, createText, destroyBlock, detachNode, init, insert, proto, setData, updateKeyedEach } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var each_blocks_1 = [], each_lookup = blankObject(), each_anchor; @@ -24,7 +24,7 @@ function create_main_fragment(component, ctx) { m(target, anchor) { for (i = 0; i < each_blocks_1.length; i += 1) each_blocks_1[i].m(target, anchor); - insertNode(each_anchor, target, anchor); + insert(target, each_anchor, anchor); }, p(changed, ctx) { @@ -58,8 +58,8 @@ function create_each_block(component, key_1, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); - appendNode(text, div); + insert(target, div, anchor); + append(div, text); }, p(changed, ctx) { diff --git a/test/js/samples/event-handlers-custom/expected-bundle.js b/test/js/samples/event-handlers-custom/expected-bundle.js index e254bd203b..73526d1c61 100644 --- a/test/js/samples/event-handlers-custom/expected-bundle.js +++ b/test/js/samples/event-handlers-custom/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -154,7 +154,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(button, target, anchor); + insert(target, button, anchor); }, p(changed, _ctx) { diff --git a/test/js/samples/event-handlers-custom/expected.js b/test/js/samples/event-handlers-custom/expected.js index c72362620b..7ae23e8832 100644 --- a/test/js/samples/event-handlers-custom/expected.js +++ b/test/js/samples/event-handlers-custom/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, createElement, detachNode, init, insertNode, proto } from "svelte/shared.js"; +import { assign, createElement, detachNode, init, insert, proto } from "svelte/shared.js"; function foo( node, callback ) { // code goes here @@ -24,7 +24,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(button, target, anchor); + insert(target, button, anchor); }, p(changed, _ctx) { diff --git a/test/js/samples/head-no-whitespace/expected-bundle.js b/test/js/samples/head-no-whitespace/expected-bundle.js index 66af456722..baddc6b82e 100644 --- a/test/js/samples/head-no-whitespace/expected-bundle.js +++ b/test/js/samples/head-no-whitespace/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } @@ -146,8 +146,8 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - appendNode(meta, document.head); - appendNode(meta_1, document.head); + append(document.head, meta); + append(document.head, meta_1); }, p: noop, diff --git a/test/js/samples/head-no-whitespace/expected.js b/test/js/samples/head-no-whitespace/expected.js index 1c12cdc894..c4049fe7f8 100644 --- a/test/js/samples/head-no-whitespace/expected.js +++ b/test/js/samples/head-no-whitespace/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, createElement, detachNode, init, noop, proto } from "svelte/shared.js"; +import { append, assign, createElement, detachNode, init, noop, proto } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var meta, meta_1; @@ -15,8 +15,8 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - appendNode(meta, document.head); - appendNode(meta_1, document.head); + append(document.head, meta); + append(document.head, meta_1); }, p: noop, diff --git a/test/js/samples/if-block-no-update/expected-bundle.js b/test/js/samples/if-block-no-update/expected-bundle.js index 0b936db262..5d410c6ae8 100644 --- a/test/js/samples/if-block-no-update/expected-bundle.js +++ b/test/js/samples/if-block-no-update/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -155,7 +155,7 @@ function create_main_fragment(component, ctx) { m(target, anchor) { if_block.m(target, anchor); - insertNode(if_block_anchor, target, anchor); + insert(target, if_block_anchor, anchor); }, p(changed, ctx) { @@ -187,7 +187,7 @@ function create_if_block(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { @@ -209,7 +209,7 @@ function create_if_block_1(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js index 65d4a4a900..0ab6242c49 100644 --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, createComment, createElement, detachNode, init, insertNode, proto } from "svelte/shared.js"; +import { assign, createComment, createElement, detachNode, init, insert, proto } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var if_block_anchor; @@ -20,7 +20,7 @@ function create_main_fragment(component, ctx) { m(target, anchor) { if_block.m(target, anchor); - insertNode(if_block_anchor, target, anchor); + insert(target, if_block_anchor, anchor); }, p(changed, ctx) { @@ -52,7 +52,7 @@ function create_if_block(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { @@ -74,7 +74,7 @@ function create_if_block_1(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { diff --git a/test/js/samples/if-block-simple/expected-bundle.js b/test/js/samples/if-block-simple/expected-bundle.js index e2034c1527..27d7b8a5f2 100644 --- a/test/js/samples/if-block-simple/expected-bundle.js +++ b/test/js/samples/if-block-simple/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -149,7 +149,7 @@ function create_main_fragment(component, ctx) { m(target, anchor) { if (if_block) if_block.m(target, anchor); - insertNode(if_block_anchor, target, anchor); + insert(target, if_block_anchor, anchor); }, p(changed, ctx) { @@ -185,7 +185,7 @@ function create_if_block(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js index f09325bc97..1592464f9f 100644 --- a/test/js/samples/if-block-simple/expected.js +++ b/test/js/samples/if-block-simple/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, createComment, createElement, detachNode, init, insertNode, proto } from "svelte/shared.js"; +import { assign, createComment, createElement, detachNode, init, insert, proto } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var if_block_anchor; @@ -14,7 +14,7 @@ function create_main_fragment(component, ctx) { m(target, anchor) { if (if_block) if_block.m(target, anchor); - insertNode(if_block_anchor, target, anchor); + insert(target, if_block_anchor, anchor); }, p(changed, ctx) { @@ -50,7 +50,7 @@ function create_if_block(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { diff --git a/test/js/samples/inline-style-optimized-multiple/expected-bundle.js b/test/js/samples/inline-style-optimized-multiple/expected-bundle.js index b65fd4ec2f..c0f3ff99d2 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected-bundle.js +++ b/test/js/samples/inline-style-optimized-multiple/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -147,7 +147,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); }, p(changed, ctx) { diff --git a/test/js/samples/inline-style-optimized-multiple/expected.js b/test/js/samples/inline-style-optimized-multiple/expected.js index ac3408963e..2768d3c8de 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected.js +++ b/test/js/samples/inline-style-optimized-multiple/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, createElement, detachNode, init, insertNode, proto, setStyle } from "svelte/shared.js"; +import { assign, createElement, detachNode, init, insert, proto, setStyle } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var div; @@ -12,7 +12,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); }, p(changed, ctx) { diff --git a/test/js/samples/inline-style-optimized-url/expected-bundle.js b/test/js/samples/inline-style-optimized-url/expected-bundle.js index 908b20e948..b04307dc3c 100644 --- a/test/js/samples/inline-style-optimized-url/expected-bundle.js +++ b/test/js/samples/inline-style-optimized-url/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -146,7 +146,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); }, p(changed, ctx) { diff --git a/test/js/samples/inline-style-optimized-url/expected.js b/test/js/samples/inline-style-optimized-url/expected.js index bfe4d19d54..5257071ee3 100644 --- a/test/js/samples/inline-style-optimized-url/expected.js +++ b/test/js/samples/inline-style-optimized-url/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, createElement, detachNode, init, insertNode, proto, setStyle } from "svelte/shared.js"; +import { assign, createElement, detachNode, init, insert, proto, setStyle } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var div; @@ -11,7 +11,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); }, p(changed, ctx) { diff --git a/test/js/samples/inline-style-optimized/expected-bundle.js b/test/js/samples/inline-style-optimized/expected-bundle.js index fec142ef75..ee08f28f21 100644 --- a/test/js/samples/inline-style-optimized/expected-bundle.js +++ b/test/js/samples/inline-style-optimized/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -146,7 +146,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); }, p(changed, ctx) { diff --git a/test/js/samples/inline-style-optimized/expected.js b/test/js/samples/inline-style-optimized/expected.js index 0ee8d8abd6..4765fe8cbf 100644 --- a/test/js/samples/inline-style-optimized/expected.js +++ b/test/js/samples/inline-style-optimized/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, createElement, detachNode, init, insertNode, proto, setStyle } from "svelte/shared.js"; +import { assign, createElement, detachNode, init, insert, proto, setStyle } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var div; @@ -11,7 +11,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); }, p(changed, ctx) { diff --git a/test/js/samples/inline-style-unoptimized/expected-bundle.js b/test/js/samples/inline-style-unoptimized/expected-bundle.js index 93993ce8df..1ec722ca2d 100644 --- a/test/js/samples/inline-style-unoptimized/expected-bundle.js +++ b/test/js/samples/inline-style-unoptimized/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -149,9 +149,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); - insertNode(text, target, anchor); - insertNode(div_1, target, anchor); + insert(target, div, anchor); + insert(target, text, anchor); + insert(target, div_1, anchor); }, p(changed, ctx) { diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js index 27fdf60c57..88f242f3ae 100644 --- a/test/js/samples/inline-style-unoptimized/expected.js +++ b/test/js/samples/inline-style-unoptimized/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, createElement, createText, detachNode, init, insertNode, proto } from "svelte/shared.js"; +import { assign, createElement, createText, detachNode, init, insert, proto } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var div, text, div_1, div_1_style_value; @@ -14,9 +14,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); - insertNode(text, target, anchor); - insertNode(div_1, target, anchor); + insert(target, div, anchor); + insert(target, text, anchor); + insert(target, div_1, anchor); }, p(changed, ctx) { diff --git a/test/js/samples/input-files/expected-bundle.js b/test/js/samples/input-files/expected-bundle.js index 097dc9e1b5..1a6376f193 100644 --- a/test/js/samples/input-files/expected-bundle.js +++ b/test/js/samples/input-files/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -162,7 +162,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(input, target, anchor); + insert(target, input, anchor); input.files = ctx.files; }, diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js index 8ca7fa17e5..d6197dbb28 100644 --- a/test/js/samples/input-files/expected.js +++ b/test/js/samples/input-files/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener, setAttribute } from "svelte/shared.js"; +import { addListener, assign, createElement, detachNode, init, insert, proto, removeListener, setAttribute } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var input, input_updating = false; @@ -19,7 +19,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(input, target, anchor); + insert(target, input, anchor); input.files = ctx.files; }, diff --git a/test/js/samples/input-range/expected-bundle.js b/test/js/samples/input-range/expected-bundle.js index 50ba725fa9..f9b53e91a5 100644 --- a/test/js/samples/input-range/expected-bundle.js +++ b/test/js/samples/input-range/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -164,7 +164,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(input, target, anchor); + insert(target, input, anchor); input.value = ctx.value; }, diff --git a/test/js/samples/input-range/expected.js b/test/js/samples/input-range/expected.js index 1b3d77fdbf..12cda533c6 100644 --- a/test/js/samples/input-range/expected.js +++ b/test/js/samples/input-range/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener, setAttribute, toNumber } from "svelte/shared.js"; +import { addListener, assign, createElement, detachNode, init, insert, proto, removeListener, setAttribute, toNumber } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var input; @@ -17,7 +17,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(input, target, anchor); + insert(target, input, anchor); input.value = ctx.value; }, diff --git a/test/js/samples/input-without-blowback-guard/expected-bundle.js b/test/js/samples/input-without-blowback-guard/expected-bundle.js index 5bf43ec519..c3abad14fe 100644 --- a/test/js/samples/input-without-blowback-guard/expected-bundle.js +++ b/test/js/samples/input-without-blowback-guard/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -159,7 +159,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(input, target, anchor); + insert(target, input, anchor); input.checked = ctx.foo; }, diff --git a/test/js/samples/input-without-blowback-guard/expected.js b/test/js/samples/input-without-blowback-guard/expected.js index be051e1cfa..66e02fdbaf 100644 --- a/test/js/samples/input-without-blowback-guard/expected.js +++ b/test/js/samples/input-without-blowback-guard/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { addListener, assign, createElement, detachNode, init, insertNode, proto, removeListener, setAttribute } from "svelte/shared.js"; +import { addListener, assign, createElement, detachNode, init, insert, proto, removeListener, setAttribute } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var input; @@ -16,7 +16,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(input, target, anchor); + insert(target, input, anchor); input.checked = ctx.foo; }, diff --git a/test/js/samples/legacy-input-type/expected-bundle.js b/test/js/samples/legacy-input-type/expected-bundle.js index 55cbf0425c..e72c5538d5 100644 --- a/test/js/samples/legacy-input-type/expected-bundle.js +++ b/test/js/samples/legacy-input-type/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -148,7 +148,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(input, target, anchor); + insert(target, input, anchor); }, p: noop, diff --git a/test/js/samples/legacy-input-type/expected.js b/test/js/samples/legacy-input-type/expected.js index c1706ab900..d44b789837 100644 --- a/test/js/samples/legacy-input-type/expected.js +++ b/test/js/samples/legacy-input-type/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, createElement, detachNode, init, insertNode, noop, proto, setInputType } from "svelte/shared.js"; +import { assign, createElement, detachNode, init, insert, noop, proto, setInputType } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var input; @@ -11,7 +11,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(input, target, anchor); + insert(target, input, anchor); }, p: noop, diff --git a/test/js/samples/media-bindings/expected-bundle.js b/test/js/samples/media-bindings/expected-bundle.js index ec9116f544..4af5ac49d3 100644 --- a/test/js/samples/media-bindings/expected-bundle.js +++ b/test/js/samples/media-bindings/expected-bundle.js @@ -5,7 +5,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -200,7 +200,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(audio, target, anchor); + insert(target, audio, anchor); audio.volume = ctx.volume; }, diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js index 9e4e863b00..59dc55b528 100644 --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { addListener, assign, callAll, createElement, detachNode, init, insertNode, proto, removeListener, timeRangesToArray } from "svelte/shared.js"; +import { addListener, assign, callAll, createElement, detachNode, init, insert, proto, removeListener, timeRangesToArray } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var audio, audio_is_paused = true, audio_updating = false, audio_animationframe; @@ -53,7 +53,7 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(audio, target, anchor); + insert(target, audio, anchor); audio.volume = ctx.volume; }, diff --git a/test/js/samples/non-imported-component/expected-bundle.js b/test/js/samples/non-imported-component/expected-bundle.js index 45134a785a..649f6b1f61 100644 --- a/test/js/samples/non-imported-component/expected-bundle.js +++ b/test/js/samples/non-imported-component/expected-bundle.js @@ -7,7 +7,7 @@ function assign(tar, src) { return tar; } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -158,7 +158,7 @@ function create_main_fragment(component, ctx) { m(target, anchor) { imported._mount(target, anchor); - insertNode(text, target, anchor); + insert(target, text, anchor); nonimported._mount(target, anchor); }, diff --git a/test/js/samples/non-imported-component/expected.js b/test/js/samples/non-imported-component/expected.js index b3e01289c3..f7d1462a80 100644 --- a/test/js/samples/non-imported-component/expected.js +++ b/test/js/samples/non-imported-component/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { assign, callAll, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; +import { assign, callAll, createText, detachNode, init, insert, noop, proto } from "svelte/shared.js"; import Imported from 'Imported.html'; @@ -26,7 +26,7 @@ function create_main_fragment(component, ctx) { m(target, anchor) { imported._mount(target, anchor); - insertNode(text, target, anchor); + insert(target, text, anchor); nonimported._mount(target, anchor); }, diff --git a/test/js/samples/svg-title/expected-bundle.js b/test/js/samples/svg-title/expected-bundle.js index ab950e54a5..4fa8bb9e34 100644 --- a/test/js/samples/svg-title/expected-bundle.js +++ b/test/js/samples/svg-title/expected-bundle.js @@ -5,11 +5,11 @@ function assign(tar, src) { return tar; } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -151,9 +151,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(svg, target, anchor); - appendNode(title, svg); - appendNode(text, title); + insert(target, svg, anchor); + append(svg, title); + append(title, text); }, p: noop, diff --git a/test/js/samples/svg-title/expected.js b/test/js/samples/svg-title/expected.js index fc06591018..82d1085419 100644 --- a/test/js/samples/svg-title/expected.js +++ b/test/js/samples/svg-title/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, createSvgElement, createText, detachNode, init, insertNode, noop, proto } from "svelte/shared.js"; +import { append, assign, createSvgElement, createText, detachNode, init, insert, noop, proto } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var svg, title, text; @@ -12,9 +12,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(svg, target, anchor); - appendNode(title, svg); - appendNode(text, title); + insert(target, svg, anchor); + append(svg, title); + append(title, text); }, p: noop, diff --git a/test/js/samples/use-elements-as-anchors/expected-bundle.js b/test/js/samples/use-elements-as-anchors/expected-bundle.js index f0df077bfa..e9c3391f88 100644 --- a/test/js/samples/use-elements-as-anchors/expected-bundle.js +++ b/test/js/samples/use-elements-as-anchors/expected-bundle.js @@ -5,11 +5,11 @@ function assign(tar, src) { return tar; } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -179,21 +179,21 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); if (if_block) if_block.m(div, null); - appendNode(text, div); - appendNode(p, div); - appendNode(text_2, div); + append(div, text); + append(div, p); + append(div, text_2); if (if_block_1) if_block_1.m(div, null); - appendNode(text_3, div); + append(div, text_3); if (if_block_2) if_block_2.m(div, null); - appendNode(text_4, div); - appendNode(p_1, div); - appendNode(text_6, div); + append(div, text_4); + append(div, p_1); + append(div, text_6); if (if_block_3) if_block_3.m(div, null); - insertNode(text_8, target, anchor); + insert(target, text_8, anchor); if (if_block_4) if_block_4.m(target, anchor); - insertNode(if_block_4_anchor, target, anchor); + insert(target, if_block_4_anchor, anchor); }, p(changed, ctx) { @@ -285,7 +285,7 @@ function create_if_block(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { @@ -307,7 +307,7 @@ function create_if_block_1(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { @@ -329,7 +329,7 @@ function create_if_block_2(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { @@ -351,7 +351,7 @@ function create_if_block_3(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { @@ -373,7 +373,7 @@ function create_if_block_4(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js index 81a97df8ba..a77fd5862e 100644 --- a/test/js/samples/use-elements-as-anchors/expected.js +++ b/test/js/samples/use-elements-as-anchors/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, createComment, createElement, createText, detachNode, init, insertNode, proto } from "svelte/shared.js"; +import { append, assign, createComment, createElement, createText, detachNode, init, insert, proto } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var div, text, p, text_2, text_3, text_4, p_1, text_6, text_8, if_block_4_anchor; @@ -36,21 +36,21 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(div, target, anchor); + insert(target, div, anchor); if (if_block) if_block.m(div, null); - appendNode(text, div); - appendNode(p, div); - appendNode(text_2, div); + append(div, text); + append(div, p); + append(div, text_2); if (if_block_1) if_block_1.m(div, null); - appendNode(text_3, div); + append(div, text_3); if (if_block_2) if_block_2.m(div, null); - appendNode(text_4, div); - appendNode(p_1, div); - appendNode(text_6, div); + append(div, text_4); + append(div, p_1); + append(div, text_6); if (if_block_3) if_block_3.m(div, null); - insertNode(text_8, target, anchor); + insert(target, text_8, anchor); if (if_block_4) if_block_4.m(target, anchor); - insertNode(if_block_4_anchor, target, anchor); + insert(target, if_block_4_anchor, anchor); }, p(changed, ctx) { @@ -142,7 +142,7 @@ function create_if_block(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { @@ -164,7 +164,7 @@ function create_if_block_1(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { @@ -186,7 +186,7 @@ function create_if_block_2(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { @@ -208,7 +208,7 @@ function create_if_block_3(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { @@ -230,7 +230,7 @@ function create_if_block_4(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); + insert(target, p, anchor); }, d(detach) { diff --git a/test/js/samples/window-binding-scroll/expected-bundle.js b/test/js/samples/window-binding-scroll/expected-bundle.js index 2e3f892fdf..4c835f62b3 100644 --- a/test/js/samples/window-binding-scroll/expected-bundle.js +++ b/test/js/samples/window-binding-scroll/expected-bundle.js @@ -5,11 +5,11 @@ function assign(tar, src) { return tar; } -function appendNode(node, target) { +function append(target, node) { target.appendChild(node); } -function insertNode(node, target, anchor) { +function insert(target, node, anchor) { target.insertBefore(node, anchor); } @@ -175,9 +175,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); - appendNode(text, p); - appendNode(text_1, p); + insert(target, p, anchor); + append(p, text); + append(p, text_1); }, p(changed, ctx) { diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index 126f437537..e5d0122b13 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -1,5 +1,5 @@ /* generated by Svelte vX.Y.Z */ -import { appendNode, assign, createElement, createText, detachNode, init, insertNode, proto, setData } from "svelte/shared.js"; +import { append, assign, createElement, createText, detachNode, init, insert, proto, setData } from "svelte/shared.js"; function create_main_fragment(component, ctx) { var window_updating = false, clear_window_updating = function() { window_updating = false; }, window_updating_timeout, p, text, text_1; @@ -32,9 +32,9 @@ function create_main_fragment(component, ctx) { }, m(target, anchor) { - insertNode(p, target, anchor); - appendNode(text, p); - appendNode(text_1, p); + insert(target, p, anchor); + append(p, text); + append(p, text_1); }, p(changed, ctx) { diff --git a/test/runtime/samples/whitespace-each-block/_config.js b/test/runtime/samples/whitespace-each-block/_config.js index a196aa2236..98849ce141 100644 --- a/test/runtime/samples/whitespace-each-block/_config.js +++ b/test/runtime/samples/whitespace-each-block/_config.js @@ -1,12 +1,12 @@ export default { data: { - name: 'world' + characters: ['a', 'b', 'c'] }, test ( assert, component, target ) { assert.equal( target.textContent, - `Hello world! How are you?` + `a b c ` ); } }; \ No newline at end of file diff --git a/test/runtime/samples/whitespace-each-block/main.html b/test/runtime/samples/whitespace-each-block/main.html index c845c255dd..cf8511fe39 100644 --- a/test/runtime/samples/whitespace-each-block/main.html +++ b/test/runtime/samples/whitespace-each-block/main.html @@ -1 +1,3 @@ -

Hello {name}! How are you?

+{#each characters as char} + {char} +{/each} \ No newline at end of file diff --git a/test/runtime/samples/whitespace-list/_config.js b/test/runtime/samples/whitespace-list/_config.js new file mode 100644 index 0000000000..fd58453e51 --- /dev/null +++ b/test/runtime/samples/whitespace-list/_config.js @@ -0,0 +1,22 @@ +export default { + data: { + // so it doesn't use innerHTML + one: 'one', + two: 'two', + three: 'three' + }, + + html: ` + + `, + + test(assert, component, target) { + const ul = target.querySelector('ul'); + + assert.equal(ul.childNodes.length, 5); + }, +}; diff --git a/test/runtime/samples/whitespace-list/main.html b/test/runtime/samples/whitespace-list/main.html new file mode 100644 index 0000000000..c66f7344e5 --- /dev/null +++ b/test/runtime/samples/whitespace-list/main.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/test/runtime/samples/whitespace-normal/_config.js b/test/runtime/samples/whitespace-normal/_config.js index 98849ce141..a196aa2236 100644 --- a/test/runtime/samples/whitespace-normal/_config.js +++ b/test/runtime/samples/whitespace-normal/_config.js @@ -1,12 +1,12 @@ export default { data: { - characters: ['a', 'b', 'c'] + name: 'world' }, test ( assert, component, target ) { assert.equal( target.textContent, - `a b c ` + `Hello world! How are you?` ); } }; \ No newline at end of file diff --git a/test/runtime/samples/whitespace-normal/main.html b/test/runtime/samples/whitespace-normal/main.html index cf8511fe39..c845c255dd 100644 --- a/test/runtime/samples/whitespace-normal/main.html +++ b/test/runtime/samples/whitespace-normal/main.html @@ -1,3 +1 @@ -{#each characters as char} - {char} -{/each} \ No newline at end of file +

Hello {name}! How are you?