diff --git a/src/compiler/compile/render_dom/Renderer.ts b/src/compiler/compile/render_dom/Renderer.ts
index 262297bd16..6de1c92f07 100644
--- a/src/compiler/compile/render_dom/Renderer.ts
+++ b/src/compiler/compile/render_dom/Renderer.ts
@@ -238,12 +238,12 @@ export default class Renderer {
const expression = bitmask
.map((b, i) => ({ b, i }))
.filter(({ b }) => b)
- .map(({ b, i }) => x`${dirty}[${i}] & /* ${b.names.join(', ')} */ ${b.n}`)
+ .map(({ b, i }) => x`${dirty}[${i}] & /*${b.names.join(', ')}*/ ${b.n}`)
.reduce((lhs, rhs) => x`${lhs} | ${rhs}`);
({ operator, left, right } = expression);
} else {
- ({ operator, left, right } = x`${dirty} & /* ${names.join(', ')} */ ${bitmask[0] ? bitmask[0].n : 0}` as BinaryExpression); // TODO the `: 0` case should never apply
+ ({ operator, left, right } = x`${dirty} & /*${names.join(', ')}*/ ${bitmask[0] ? bitmask[0].n : 0}` as BinaryExpression); // TODO the `: 0` case should never apply
}
return 'BinaryExpression';
@@ -274,7 +274,7 @@ export default class Renderer {
}
if (member !== undefined) {
- const replacement = x`#ctx[${member.index}]` as MemberExpression;
+ const replacement = x`/*${member.name}*/ #ctx[${member.index}]` as MemberExpression;
if (nodes[0].loc) replacement.object.loc = nodes[0].loc;
nodes[0] = replacement;
diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js
index 60de121165..6c3a2a5b0b 100644
--- a/test/js/samples/action-custom-event-handler/expected.js
+++ b/test/js/samples/action-custom-event-handler/expected.js
@@ -21,10 +21,10 @@ function create_fragment(ctx) {
},
m(target, anchor) {
insert(target, button, anchor);
- foo_action = foo.call(null, button, ctx[1]) || ({});
+ foo_action = foo.call(null, button, /*foo_function*/ ctx[1]) || ({});
},
p(ctx, [dirty]) {
- if (is_function(foo_action.update) && dirty & /* bar */ 1) foo_action.update.call(null, ctx[1]);
+ if (is_function(foo_action.update) && dirty & /*bar*/ 1) foo_action.update.call(null, /*foo_function*/ ctx[1]);
},
i: noop,
o: noop,
diff --git a/test/js/samples/bind-online/expected.js b/test/js/samples/bind-online/expected.js
index a2e0c0b89d..8285646481 100644
--- a/test/js/samples/bind-online/expected.js
+++ b/test/js/samples/bind-online/expected.js
@@ -11,11 +11,14 @@ import {
function create_fragment(ctx) {
let dispose;
- add_render_callback(ctx[1]);
+ add_render_callback(/*onlinestatuschanged*/ ctx[1]);
return {
c() {
- dispose = [listen(window, "online", ctx[1]), listen(window, "offline", ctx[1])];
+ dispose = [
+ listen(window, "online", /*onlinestatuschanged*/ ctx[1]),
+ listen(window, "offline", /*onlinestatuschanged*/ ctx[1])
+ ];
},
m: noop,
p: noop,
diff --git a/test/js/samples/bind-open/expected.js b/test/js/samples/bind-open/expected.js
index d64715f1af..d4f148cac9 100644
--- a/test/js/samples/bind-open/expected.js
+++ b/test/js/samples/bind-open/expected.js
@@ -21,15 +21,15 @@ function create_fragment(ctx) {
details.innerHTML = `summarycontent
`;
- dispose = listen(details, "toggle", ctx[1]);
+ dispose = listen(details, "toggle", /*details_toggle_handler*/ ctx[1]);
},
m(target, anchor) {
insert(target, details, anchor);
- details.open = ctx[0];
+ details.open = /*open*/ ctx[0];
},
p(ctx, [dirty]) {
- if (dirty & /* open */ 1) {
- details.open = ctx[0];
+ if (dirty & /*open*/ 1) {
+ details.open = /*open*/ ctx[0];
}
},
i: noop,
diff --git a/test/js/samples/bind-width-height/expected.js b/test/js/samples/bind-width-height/expected.js
index 551f05fd76..5c1888b7db 100644
--- a/test/js/samples/bind-width-height/expected.js
+++ b/test/js/samples/bind-width-height/expected.js
@@ -19,11 +19,11 @@ function create_fragment(ctx) {
c() {
div = element("div");
div.textContent = "some content";
- add_render_callback(() => ctx[2].call(div));
+ add_render_callback(() => /*div_elementresize_handler*/ ctx[2].call(div));
},
m(target, anchor) {
insert(target, div, anchor);
- div_resize_listener = add_resize_listener(div, ctx[2].bind(div));
+ div_resize_listener = add_resize_listener(div, /*div_elementresize_handler*/ ctx[2].bind(div));
},
p: noop,
i: noop,
diff --git a/test/js/samples/bindings-readonly-order/expected.js b/test/js/samples/bindings-readonly-order/expected.js
index 99078890f0..cf30686662 100644
--- a/test/js/samples/bindings-readonly-order/expected.js
+++ b/test/js/samples/bindings-readonly-order/expected.js
@@ -26,7 +26,11 @@ function create_fragment(ctx) {
input1 = element("input");
attr(input0, "type", "file");
attr(input1, "type", "file");
- dispose = [listen(input0, "change", ctx[1]), listen(input1, "change", ctx[2])];
+
+ dispose = [
+ listen(input0, "change", /*input0_change_handler*/ ctx[1]),
+ listen(input1, "change", /*input1_change_handler*/ ctx[2])
+ ];
},
m(target, anchor) {
insert(target, input0, anchor);
diff --git a/test/js/samples/capture-inject-dev-only/expected.js b/test/js/samples/capture-inject-dev-only/expected.js
index 58660caf7e..6c639d9207 100644
--- a/test/js/samples/capture-inject-dev-only/expected.js
+++ b/test/js/samples/capture-inject-dev-only/expected.js
@@ -25,23 +25,23 @@ function create_fragment(ctx) {
return {
c() {
p = element("p");
- t0 = text(ctx[0]);
+ t0 = text(/*foo*/ ctx[0]);
t1 = space();
input = element("input");
- dispose = listen(input, "input", ctx[1]);
+ dispose = listen(input, "input", /*input_input_handler*/ ctx[1]);
},
m(target, anchor) {
insert(target, p, anchor);
append(p, t0);
insert(target, t1, anchor);
insert(target, input, anchor);
- set_input_value(input, ctx[0]);
+ set_input_value(input, /*foo*/ ctx[0]);
},
p(ctx, [dirty]) {
- if (dirty & /* foo */ 1) set_data(t0, ctx[0]);
+ if (dirty & /*foo*/ 1) set_data(t0, /*foo*/ ctx[0]);
- if (dirty & /* foo */ 1 && input.value !== ctx[0]) {
- set_input_value(input, ctx[0]);
+ if (dirty & /*foo*/ 1 && input.value !== /*foo*/ ctx[0]) {
+ set_input_value(input, /*foo*/ ctx[0]);
}
},
i: noop,
diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js
index 8e9aa91bb0..24f2703f0a 100644
--- a/test/js/samples/collapses-text-around-comments/expected.js
+++ b/test/js/samples/collapses-text-around-comments/expected.js
@@ -16,7 +16,7 @@ import {
function add_css() {
var style = element("style");
style.id = "svelte-1a7i8ec-style";
- style.textContent = "p.svelte-1a7i8ec{color:red}";
+ style.textContent = "p.svelte-1a7i8ec{\n\t\tcolor: red;\n\t}";
append(document.head, style);
}
@@ -27,7 +27,7 @@ function create_fragment(ctx) {
return {
c() {
p = element("p");
- t = text(ctx[0]);
+ t = text(/*foo*/ ctx[0]);
attr(p, "class", "svelte-1a7i8ec");
},
m(target, anchor) {
@@ -35,7 +35,7 @@ function create_fragment(ctx) {
append(p, t);
},
p(ctx, [dirty]) {
- if (dirty & /* foo */ 1) set_data(t, ctx[0]);
+ if (dirty & /*foo*/ 1) set_data(t, /*foo*/ ctx[0]);
},
i: noop,
o: noop,
diff --git a/test/js/samples/component-static-array/expected.js b/test/js/samples/component-static-array/expected.js
index 7948ecd171..44e8dbfe33 100644
--- a/test/js/samples/component-static-array/expected.js
+++ b/test/js/samples/component-static-array/expected.js
@@ -13,7 +13,7 @@ import {
function create_fragment(ctx) {
let current;
- const nested = new ctx[0]({ props: { foo: [1, 2, 3] } });
+ const nested = new /*Nested*/ ctx[0]({ props: { foo: [1, 2, 3] } });
return {
c() {
diff --git a/test/js/samples/component-static-immutable/expected.js b/test/js/samples/component-static-immutable/expected.js
index 80d531b793..a7dd8128fa 100644
--- a/test/js/samples/component-static-immutable/expected.js
+++ b/test/js/samples/component-static-immutable/expected.js
@@ -13,7 +13,7 @@ import {
function create_fragment(ctx) {
let current;
- const nested = new ctx[0]({ props: { foo: "bar" } });
+ const nested = new /*Nested*/ ctx[0]({ props: { foo: "bar" } });
return {
c() {
diff --git a/test/js/samples/component-static-immutable2/expected.js b/test/js/samples/component-static-immutable2/expected.js
index 80d531b793..a7dd8128fa 100644
--- a/test/js/samples/component-static-immutable2/expected.js
+++ b/test/js/samples/component-static-immutable2/expected.js
@@ -13,7 +13,7 @@ import {
function create_fragment(ctx) {
let current;
- const nested = new ctx[0]({ props: { foo: "bar" } });
+ const nested = new /*Nested*/ ctx[0]({ props: { foo: "bar" } });
return {
c() {
diff --git a/test/js/samples/component-static-var/expected.js b/test/js/samples/component-static-var/expected.js
index d28cec4f70..e01402b6d4 100644
--- a/test/js/samples/component-static-var/expected.js
+++ b/test/js/samples/component-static-var/expected.js
@@ -26,7 +26,7 @@ function create_fragment(ctx) {
let current;
let dispose;
const foo = new Foo({ props: { x: y } });
- const bar = new Bar({ props: { x: ctx[0] } });
+ const bar = new Bar({ props: { x: /*z*/ ctx[0] } });
return {
c() {
@@ -35,7 +35,7 @@ function create_fragment(ctx) {
create_component(bar.$$.fragment);
t1 = space();
input = element("input");
- dispose = listen(input, "input", ctx[1]);
+ dispose = listen(input, "input", /*input_input_handler*/ ctx[1]);
},
m(target, anchor) {
mount_component(foo, target, anchor);
@@ -43,16 +43,16 @@ function create_fragment(ctx) {
mount_component(bar, target, anchor);
insert(target, t1, anchor);
insert(target, input, anchor);
- set_input_value(input, ctx[0]);
+ set_input_value(input, /*z*/ ctx[0]);
current = true;
},
p(ctx, [dirty]) {
const bar_changes = {};
- if (dirty & /* z */ 1) bar_changes.x = ctx[0];
+ if (dirty & /*z*/ 1) bar_changes.x = /*z*/ ctx[0];
bar.$set(bar_changes);
- if (dirty & /* z */ 1 && input.value !== ctx[0]) {
- set_input_value(input, ctx[0]);
+ if (dirty & /*z*/ 1 && input.value !== /*z*/ ctx[0]) {
+ set_input_value(input, /*z*/ ctx[0]);
}
},
i(local) {
diff --git a/test/js/samples/component-static/expected.js b/test/js/samples/component-static/expected.js
index c242bf0bf5..26c63f550b 100644
--- a/test/js/samples/component-static/expected.js
+++ b/test/js/samples/component-static/expected.js
@@ -13,7 +13,7 @@ import {
function create_fragment(ctx) {
let current;
- const nested = new ctx[0]({ props: { foo: "bar" } });
+ const nested = new /*Nested*/ ctx[0]({ props: { foo: "bar" } });
return {
c() {
diff --git a/test/js/samples/component-store-access-invalidate/expected.js b/test/js/samples/component-store-access-invalidate/expected.js
index abbb3f6e7c..151bd6ed0e 100644
--- a/test/js/samples/component-store-access-invalidate/expected.js
+++ b/test/js/samples/component-store-access-invalidate/expected.js
@@ -22,14 +22,14 @@ function create_fragment(ctx) {
return {
c() {
h1 = element("h1");
- t = text(ctx[0]);
+ t = text(/*$foo*/ ctx[0]);
},
m(target, anchor) {
insert(target, h1, anchor);
append(h1, t);
},
p(ctx, [dirty]) {
- if (dirty & /* $foo */ 1) set_data(t, ctx[0]);
+ if (dirty & /*$foo*/ 1) set_data(t, /*$foo*/ ctx[0]);
},
i: noop,
o: noop,
diff --git a/test/js/samples/component-store-reassign-invalidate/expected.js b/test/js/samples/component-store-reassign-invalidate/expected.js
index 8c8dec8d44..02a74cf22e 100644
--- a/test/js/samples/component-store-reassign-invalidate/expected.js
+++ b/test/js/samples/component-store-reassign-invalidate/expected.js
@@ -27,11 +27,11 @@ function create_fragment(ctx) {
return {
c() {
h1 = element("h1");
- t0 = text(ctx[1]);
+ t0 = text(/*$foo*/ ctx[1]);
t1 = space();
button = element("button");
button.textContent = "reset";
- dispose = listen(button, "click", ctx[2]);
+ dispose = listen(button, "click", /*click_handler*/ ctx[2]);
},
m(target, anchor) {
insert(target, h1, anchor);
@@ -40,7 +40,7 @@ function create_fragment(ctx) {
insert(target, button, anchor);
},
p(ctx, [dirty]) {
- if (dirty & /* $foo */ 2) set_data(t0, ctx[1]);
+ if (dirty & /*$foo*/ 2) set_data(t0, /*$foo*/ ctx[1]);
},
i: noop,
o: noop,
diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js
index f477670059..7efd6abd05 100644
--- a/test/js/samples/css-media-query/expected.js
+++ b/test/js/samples/css-media-query/expected.js
@@ -2,7 +2,6 @@
import {
SvelteComponent,
append,
- attr,
detach,
element,
init,
@@ -14,7 +13,7 @@ import {
function add_css() {
var style = element("style");
style.id = "svelte-1slhpfn-style";
- style.textContent = "@media(min-width: 1px){div.svelte-1slhpfn{color:red}}";
+ style.textContent = "@media(min-width: 1px){}";
append(document.head, style);
}
@@ -24,7 +23,6 @@ function create_fragment(ctx) {
return {
c() {
div = element("div");
- attr(div, "class", "svelte-1slhpfn");
},
m(target, anchor) {
insert(target, div, anchor);
diff --git a/test/js/samples/css-shadow-dom-keyframes/expected.js b/test/js/samples/css-shadow-dom-keyframes/expected.js
index a0a0ebe021..ae4e151e91 100644
--- a/test/js/samples/css-shadow-dom-keyframes/expected.js
+++ b/test/js/samples/css-shadow-dom-keyframes/expected.js
@@ -33,7 +33,11 @@ function create_fragment(ctx) {
class Component extends SvelteElement {
constructor(options) {
super();
- this.shadowRoot.innerHTML = ``;
+
+ this.shadowRoot.innerHTML = ``;
+
init(this, { target: this.shadowRoot }, null, create_fragment, safe_not_equal, {});
if (options) {
diff --git a/test/js/samples/data-attribute/expected.js b/test/js/samples/data-attribute/expected.js
index 0a8b3e5a4e..49ad2f2626 100644
--- a/test/js/samples/data-attribute/expected.js
+++ b/test/js/samples/data-attribute/expected.js
@@ -22,7 +22,7 @@ function create_fragment(ctx) {
t = space();
div1 = element("div");
attr(div0, "data-foo", "bar");
- attr(div1, "data-foo", ctx[0]);
+ attr(div1, "data-foo", /*bar*/ ctx[0]);
},
m(target, anchor) {
insert(target, div0, anchor);
@@ -30,8 +30,8 @@ function create_fragment(ctx) {
insert(target, div1, anchor);
},
p(ctx, [dirty]) {
- if (dirty & /* bar */ 1) {
- attr(div1, "data-foo", ctx[0]);
+ if (dirty & /*bar*/ 1) {
+ attr(div1, "data-foo", /*bar*/ ctx[0]);
}
},
i: noop,
diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js
index e47424edc4..5821faadf1 100644
--- a/test/js/samples/debug-empty/expected.js
+++ b/test/js/samples/debug-empty/expected.js
@@ -28,7 +28,7 @@ function create_fragment(ctx) {
c: function create() {
h1 = element("h1");
t0 = text("Hello ");
- t1 = text(ctx[0]);
+ t1 = text(/*name*/ ctx[0]);
t2 = text("!");
t3 = space();
debugger;
@@ -45,7 +45,7 @@ function create_fragment(ctx) {
insert_dev(target, t3, anchor);
},
p: function update(ctx, [dirty]) {
- if (dirty & /* name */ 1) set_data_dev(t1, ctx[0]);
+ if (dirty & /*name*/ 1) set_data_dev(t1, /*name*/ ctx[0]);
debugger;
},
i: noop,
@@ -105,7 +105,7 @@ class Component extends SvelteComponentDev {
const { ctx } = this.$$;
const props = options.props || ({});
- if (ctx[0] === undefined && !("name" in props)) {
+ if (/*name*/ ctx[0] === undefined && !("name" in props)) {
console.warn(" was created without expected prop 'name'");
}
}
diff --git a/test/js/samples/debug-foo-bar-baz-things/expected.js b/test/js/samples/debug-foo-bar-baz-things/expected.js
index 1f371e777c..a1d6dba3b3 100644
--- a/test/js/samples/debug-foo-bar-baz-things/expected.js
+++ b/test/js/samples/debug-foo-bar-baz-things/expected.js
@@ -27,7 +27,7 @@ function get_each_context(ctx, list, i) {
// (8:0) {#each things as thing}
function create_each_block(ctx) {
let span;
- let t0_value = ctx[4].name + "";
+ let t0_value = /*thing*/ ctx[4].name + "";
let t0;
let t1;
@@ -38,10 +38,10 @@ function create_each_block(ctx) {
t1 = space();
{
- const foo = ctx[1];
- const bar = ctx[2];
- const baz = ctx[3];
- const thing = ctx[4];
+ const foo = /*foo*/ ctx[1];
+ const bar = /*bar*/ ctx[2];
+ const baz = /*baz*/ ctx[3];
+ const thing = /*thing*/ ctx[4];
console.log({ foo, bar, baz, thing });
debugger;
}
@@ -54,13 +54,13 @@ function create_each_block(ctx) {
insert_dev(target, t1, anchor);
},
p: function update(ctx, dirty) {
- if (dirty & /* things */ 1 && t0_value !== (t0_value = ctx[4].name + "")) set_data_dev(t0, t0_value);
+ if (dirty & /*things*/ 1 && t0_value !== (t0_value = /*thing*/ ctx[4].name + "")) set_data_dev(t0, t0_value);
- if (dirty & /* foo, bar, baz, things */ 15) {
- const foo = ctx[1];
- const bar = ctx[2];
- const baz = ctx[3];
- const thing = ctx[4];
+ if (dirty & /*foo, bar, baz, things*/ 15) {
+ const foo = /*foo*/ ctx[1];
+ const bar = /*bar*/ ctx[2];
+ const baz = /*baz*/ ctx[3];
+ const thing = /*thing*/ ctx[4];
console.log({ foo, bar, baz, thing });
debugger;
}
@@ -87,7 +87,7 @@ function create_fragment(ctx) {
let p;
let t1;
let t2;
- let each_value = ctx[0];
+ let each_value = /*things*/ ctx[0];
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
@@ -103,7 +103,7 @@ function create_fragment(ctx) {
t0 = space();
p = element("p");
t1 = text("foo: ");
- t2 = text(ctx[1]);
+ t2 = text(/*foo*/ ctx[1]);
add_location(p, file, 12, 0, 182);
},
l: function claim(nodes) {
@@ -120,8 +120,8 @@ function create_fragment(ctx) {
append_dev(p, t2);
},
p: function update(ctx, [dirty]) {
- if (dirty & /* things */ 1) {
- each_value = ctx[0];
+ if (dirty & /*things*/ 1) {
+ each_value = /*things*/ ctx[0];
let i;
for (i = 0; i < each_value.length; i += 1) {
@@ -143,7 +143,7 @@ function create_fragment(ctx) {
each_blocks.length = each_value.length;
}
- if (dirty & /* foo */ 2) set_data_dev(t2, ctx[1]);
+ if (dirty & /*foo*/ 2) set_data_dev(t2, /*foo*/ ctx[1]);
},
i: noop,
o: noop,
@@ -212,19 +212,19 @@ class Component extends SvelteComponentDev {
const { ctx } = this.$$;
const props = options.props || ({});
- if (ctx[0] === undefined && !("things" in props)) {
+ if (/*things*/ ctx[0] === undefined && !("things" in props)) {
console.warn(" was created without expected prop 'things'");
}
- if (ctx[1] === undefined && !("foo" in props)) {
+ if (/*foo*/ ctx[1] === undefined && !("foo" in props)) {
console.warn(" was created without expected prop 'foo'");
}
- if (ctx[2] === undefined && !("bar" in props)) {
+ if (/*bar*/ ctx[2] === undefined && !("bar" in props)) {
console.warn(" was created without expected prop 'bar'");
}
- if (ctx[3] === undefined && !("baz" in props)) {
+ if (/*baz*/ ctx[3] === undefined && !("baz" in props)) {
console.warn(" was created without expected prop 'baz'");
}
}
diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js
index 996c99a05f..af79667cc2 100644
--- a/test/js/samples/debug-foo/expected.js
+++ b/test/js/samples/debug-foo/expected.js
@@ -27,7 +27,7 @@ function get_each_context(ctx, list, i) {
// (6:0) {#each things as thing}
function create_each_block(ctx) {
let span;
- let t0_value = ctx[2].name + "";
+ let t0_value = /*thing*/ ctx[2].name + "";
let t0;
let t1;
@@ -38,7 +38,7 @@ function create_each_block(ctx) {
t1 = space();
{
- const foo = ctx[1];
+ const foo = /*foo*/ ctx[1];
console.log({ foo });
debugger;
}
@@ -51,10 +51,10 @@ function create_each_block(ctx) {
insert_dev(target, t1, anchor);
},
p: function update(ctx, dirty) {
- if (dirty & /* things */ 1 && t0_value !== (t0_value = ctx[2].name + "")) set_data_dev(t0, t0_value);
+ if (dirty & /*things*/ 1 && t0_value !== (t0_value = /*thing*/ ctx[2].name + "")) set_data_dev(t0, t0_value);
- if (dirty & /* foo */ 2) {
- const foo = ctx[1];
+ if (dirty & /*foo*/ 2) {
+ const foo = /*foo*/ ctx[1];
console.log({ foo });
debugger;
}
@@ -81,7 +81,7 @@ function create_fragment(ctx) {
let p;
let t1;
let t2;
- let each_value = ctx[0];
+ let each_value = /*things*/ ctx[0];
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
@@ -97,7 +97,7 @@ function create_fragment(ctx) {
t0 = space();
p = element("p");
t1 = text("foo: ");
- t2 = text(ctx[1]);
+ t2 = text(/*foo*/ ctx[1]);
add_location(p, file, 10, 0, 131);
},
l: function claim(nodes) {
@@ -114,8 +114,8 @@ function create_fragment(ctx) {
append_dev(p, t2);
},
p: function update(ctx, [dirty]) {
- if (dirty & /* things */ 1) {
- each_value = ctx[0];
+ if (dirty & /*things*/ 1) {
+ each_value = /*things*/ ctx[0];
let i;
for (i = 0; i < each_value.length; i += 1) {
@@ -137,7 +137,7 @@ function create_fragment(ctx) {
each_blocks.length = each_value.length;
}
- if (dirty & /* foo */ 2) set_data_dev(t2, ctx[1]);
+ if (dirty & /*foo*/ 2) set_data_dev(t2, /*foo*/ ctx[1]);
},
i: noop,
o: noop,
@@ -200,11 +200,11 @@ class Component extends SvelteComponentDev {
const { ctx } = this.$$;
const props = options.props || ({});
- if (ctx[0] === undefined && !("things" in props)) {
+ if (/*things*/ ctx[0] === undefined && !("things" in props)) {
console.warn(" was created without expected prop 'things'");
}
- if (ctx[1] === undefined && !("foo" in props)) {
+ if (/*foo*/ ctx[1] === undefined && !("foo" in props)) {
console.warn(" was created without expected prop 'foo'");
}
}
diff --git a/test/js/samples/debug-hoisted/expected.js b/test/js/samples/debug-hoisted/expected.js
index bc0a4d701c..eeb9465499 100644
--- a/test/js/samples/debug-hoisted/expected.js
+++ b/test/js/samples/debug-hoisted/expected.js
@@ -13,8 +13,8 @@ function create_fragment(ctx) {
const block = {
c: function create() {
{
- const obj = ctx[0];
- const kobzol = ctx[1];
+ const obj = /*obj*/ ctx[0];
+ const kobzol = /*kobzol*/ ctx[1];
console.log({ obj, kobzol });
debugger;
}
@@ -24,9 +24,9 @@ function create_fragment(ctx) {
},
m: noop,
p: function update(ctx, [dirty]) {
- if (dirty & /* obj, kobzol */ 3) {
- const obj = ctx[0];
- const kobzol = ctx[1];
+ if (dirty & /*obj, kobzol*/ 3) {
+ const obj = /*obj*/ ctx[0];
+ const kobzol = /*kobzol*/ ctx[1];
console.log({ obj, kobzol });
debugger;
}
diff --git a/test/js/samples/debug-no-dependencies/expected.js b/test/js/samples/debug-no-dependencies/expected.js
index 87555e023d..054dda7953 100644
--- a/test/js/samples/debug-no-dependencies/expected.js
+++ b/test/js/samples/debug-no-dependencies/expected.js
@@ -25,13 +25,13 @@ function get_each_context(ctx, list, i) {
// (4:0) {#each things as thing, index}
function create_each_block(ctx) {
let t0;
- let t1_value = ctx[0] + "";
+ let t1_value = /*thing*/ ctx[0] + "";
let t1;
const block = {
c: function create() {
{
- const index = ctx[2];
+ const index = /*index*/ ctx[2];
console.log({ index });
debugger;
}
@@ -89,7 +89,7 @@ function create_fragment(ctx) {
insert_dev(target, each_1_anchor, anchor);
},
p: function update(ctx, [dirty]) {
- if (dirty & /* things */ 0) {
+ if (dirty & /*things*/ 0) {
each_value = things;
let i;
diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js
index 93aee0f931..fb98844ef7 100644
--- a/test/js/samples/deconflict-builtins/expected.js
+++ b/test/js/samples/deconflict-builtins/expected.js
@@ -23,7 +23,7 @@ function get_each_context(ctx, list, i) {
// (5:0) {#each createElement as node}
function create_each_block(ctx) {
let span;
- let t_value = ctx[1] + "";
+ let t_value = /*node*/ ctx[1] + "";
let t;
return {
@@ -36,7 +36,7 @@ function create_each_block(ctx) {
append(span, t);
},
p(ctx, dirty) {
- if (dirty & /* createElement */ 1 && t_value !== (t_value = ctx[1] + "")) set_data(t, t_value);
+ if (dirty & /*createElement*/ 1 && t_value !== (t_value = /*node*/ ctx[1] + "")) set_data(t, t_value);
},
d(detaching) {
if (detaching) detach(span);
@@ -46,7 +46,7 @@ function create_each_block(ctx) {
function create_fragment(ctx) {
let each_1_anchor;
- let each_value = ctx[0];
+ let each_value = /*createElement*/ ctx[0];
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
@@ -69,8 +69,8 @@ function create_fragment(ctx) {
insert(target, each_1_anchor, anchor);
},
p(ctx, [dirty]) {
- if (dirty & /* createElement */ 1) {
- each_value = ctx[0];
+ if (dirty & /*createElement*/ 1) {
+ each_value = /*createElement*/ ctx[0];
let i;
for (i = 0; i < each_value.length; i += 1) {
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 b189b3ba4d..beb794a50c 100644
--- a/test/js/samples/dev-warning-missing-data-computed/expected.js
+++ b/test/js/samples/dev-warning-missing-data-computed/expected.js
@@ -19,7 +19,7 @@ const file = undefined;
function create_fragment(ctx) {
let p;
- let t0_value = Math.max(0, ctx[0]) + "";
+ let t0_value = Math.max(0, /*foo*/ ctx[0]) + "";
let t0;
let t1;
let t2;
@@ -29,7 +29,7 @@ function create_fragment(ctx) {
p = element("p");
t0 = text(t0_value);
t1 = space();
- t2 = text(ctx[1]);
+ t2 = text(/*bar*/ ctx[1]);
add_location(p, file, 7, 0, 67);
},
l: function claim(nodes) {
@@ -42,8 +42,8 @@ function create_fragment(ctx) {
append_dev(p, t2);
},
p: function update(ctx, [dirty]) {
- if (dirty & /* foo */ 1 && t0_value !== (t0_value = Math.max(0, ctx[0]) + "")) set_data_dev(t0, t0_value);
- if (dirty & /* bar */ 2) set_data_dev(t2, ctx[1]);
+ if (dirty & /*foo*/ 1 && t0_value !== (t0_value = Math.max(0, /*foo*/ ctx[0]) + "")) set_data_dev(t0, t0_value);
+ if (dirty & /*bar*/ 2) set_data_dev(t2, /*bar*/ ctx[1]);
},
i: noop,
o: noop,
@@ -86,7 +86,7 @@ function instance($$self, $$props, $$invalidate) {
};
$$self.$$.update = () => {
- if ($$self.$$.dirty & /* foo */ 1) {
+ if ($$self.$$.dirty & /*foo*/ 1) {
$: $$invalidate(1, bar = foo * 2);
}
};
@@ -109,7 +109,7 @@ class Component extends SvelteComponentDev {
const { ctx } = this.$$;
const props = options.props || ({});
- if (ctx[0] === undefined && !("foo" in props)) {
+ if (/*foo*/ ctx[0] === undefined && !("foo" in props)) {
console.warn(" was created without expected prop 'foo'");
}
}
diff --git a/test/js/samples/each-block-array-literal/expected.js b/test/js/samples/each-block-array-literal/expected.js
index 7438540bcc..10d835cf78 100644
--- a/test/js/samples/each-block-array-literal/expected.js
+++ b/test/js/samples/each-block-array-literal/expected.js
@@ -23,7 +23,7 @@ function get_each_context(ctx, list, i) {
// (9:0) {#each [a, b, c, d, e] as num}
function create_each_block(ctx) {
let span;
- let t_value = ctx[5] + "";
+ let t_value = /*num*/ ctx[5] + "";
let t;
return {
@@ -36,7 +36,7 @@ function create_each_block(ctx) {
append(span, t);
},
p(ctx, dirty) {
- if (dirty & /* a, b, c, d, e */ 31 && t_value !== (t_value = ctx[5] + "")) set_data(t, t_value);
+ if (dirty & /*a, b, c, d, e*/ 31 && t_value !== (t_value = /*num*/ ctx[5] + "")) set_data(t, t_value);
},
d(detaching) {
if (detaching) detach(span);
@@ -46,7 +46,7 @@ function create_each_block(ctx) {
function create_fragment(ctx) {
let each_1_anchor;
- let each_value = [ctx[0], ctx[1], ctx[2], ctx[3], ctx[4]];
+ let each_value = [/*a*/ ctx[0], /*b*/ ctx[1], /*c*/ ctx[2], /*d*/ ctx[3], /*e*/ ctx[4]];
let each_blocks = [];
for (let i = 0; i < 5; i += 1) {
@@ -69,8 +69,8 @@ function create_fragment(ctx) {
insert(target, each_1_anchor, anchor);
},
p(ctx, [dirty]) {
- if (dirty & /* a, b, c, d, e */ 31) {
- each_value = [ctx[0], ctx[1], ctx[2], ctx[3], ctx[4]];
+ if (dirty & /*a, b, c, d, e*/ 31) {
+ each_value = [/*a*/ ctx[0], /*b*/ ctx[1], /*c*/ ctx[2], /*d*/ ctx[3], /*e*/ ctx[4]];
let i;
for (i = 0; i < 5; i += 1) {
diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js
index e7cfc3143c..5d88032b87 100644
--- a/test/js/samples/each-block-changed-check/expected.js
+++ b/test/js/samples/each-block-changed-check/expected.js
@@ -30,21 +30,21 @@ function create_each_block(ctx) {
let t0;
let t1;
let span;
- let t2_value = ctx[4].author + "";
+ let t2_value = /*comment*/ ctx[4].author + "";
let t2;
let t3;
- let t4_value = ctx[1](ctx[4].time, ctx[2]) + "";
+ let t4_value = /*elapsed*/ ctx[1](/*comment*/ ctx[4].time, /*time*/ ctx[2]) + "";
let t4;
let t5;
let t6;
let html_tag;
- let raw_value = ctx[4].html + "";
+ let raw_value = /*comment*/ ctx[4].html + "";
return {
c() {
div = element("div");
strong = element("strong");
- t0 = text(ctx[6]);
+ t0 = text(/*i*/ ctx[6]);
t1 = space();
span = element("span");
t2 = text(t2_value);
@@ -70,9 +70,9 @@ function create_each_block(ctx) {
html_tag.m(div);
},
p(ctx, dirty) {
- if (dirty & /* comments */ 1 && t2_value !== (t2_value = ctx[4].author + "")) set_data(t2, t2_value);
- if (dirty & /* elapsed, comments, time */ 7 && t4_value !== (t4_value = ctx[1](ctx[4].time, ctx[2]) + "")) set_data(t4, t4_value);
- if (dirty & /* comments */ 1 && raw_value !== (raw_value = ctx[4].html + "")) html_tag.p(raw_value);
+ if (dirty & /*comments*/ 1 && t2_value !== (t2_value = /*comment*/ ctx[4].author + "")) set_data(t2, t2_value);
+ if (dirty & /*elapsed, comments, time*/ 7 && t4_value !== (t4_value = /*elapsed*/ ctx[1](/*comment*/ ctx[4].time, /*time*/ ctx[2]) + "")) set_data(t4, t4_value);
+ if (dirty & /*comments*/ 1 && raw_value !== (raw_value = /*comment*/ ctx[4].html + "")) html_tag.p(raw_value);
},
d(detaching) {
if (detaching) detach(div);
@@ -84,7 +84,7 @@ function create_fragment(ctx) {
let t0;
let p;
let t1;
- let each_value = ctx[0];
+ let each_value = /*comments*/ ctx[0];
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
@@ -99,7 +99,7 @@ function create_fragment(ctx) {
t0 = space();
p = element("p");
- t1 = text(ctx[3]);
+ t1 = text(/*foo*/ ctx[3]);
},
m(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
@@ -111,8 +111,8 @@ function create_fragment(ctx) {
append(p, t1);
},
p(ctx, [dirty]) {
- if (dirty & /* comments, elapsed, time */ 7) {
- each_value = ctx[0];
+ if (dirty & /*comments, elapsed, time*/ 7) {
+ each_value = /*comments*/ ctx[0];
let i;
for (i = 0; i < each_value.length; i += 1) {
@@ -134,7 +134,7 @@ function create_fragment(ctx) {
each_blocks.length = each_value.length;
}
- if (dirty & /* foo */ 8) set_data(t1, ctx[3]);
+ if (dirty & /*foo*/ 8) set_data(t1, /*foo*/ ctx[3]);
},
i: noop,
o: noop,
diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js
index 6df3a817c0..3b697d6860 100644
--- a/test/js/samples/each-block-keyed-animated/expected.js
+++ b/test/js/samples/each-block-keyed-animated/expected.js
@@ -26,7 +26,7 @@ function get_each_context(ctx, list, i) {
// (19:0) {#each things as thing (thing.id)}
function create_each_block(key_1, ctx) {
let div;
- let t_value = ctx[1].name + "";
+ let t_value = /*thing*/ ctx[1].name + "";
let t;
let rect;
let stop_animation = noop;
@@ -44,7 +44,7 @@ function create_each_block(key_1, ctx) {
append(div, t);
},
p(ctx, dirty) {
- if (dirty & /* things */ 1 && t_value !== (t_value = ctx[1].name + "")) set_data(t, t_value);
+ if (dirty & /*things*/ 1 && t_value !== (t_value = /*thing*/ ctx[1].name + "")) set_data(t, t_value);
},
r() {
rect = div.getBoundingClientRect();
@@ -67,8 +67,8 @@ function create_fragment(ctx) {
let each_blocks = [];
let each_1_lookup = new Map();
let each_1_anchor;
- let each_value = ctx[0];
- const get_key = ctx => ctx[1].id;
+ let each_value = /*things*/ ctx[0];
+ const get_key = ctx => /*thing*/ ctx[1].id;
for (let i = 0; i < each_value.length; i += 1) {
let child_ctx = get_each_context(ctx, each_value, i);
@@ -92,7 +92,7 @@ function create_fragment(ctx) {
insert(target, each_1_anchor, anchor);
},
p(ctx, [dirty]) {
- const each_value = ctx[0];
+ const each_value = /*things*/ ctx[0];
for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].r();
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, each_1_anchor.parentNode, fix_and_destroy_block, create_each_block, each_1_anchor, get_each_context);
for (let i = 0; i < each_blocks.length; i += 1) each_blocks[i].a();
diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js
index 025e08d4f3..1cd9a31ece 100644
--- a/test/js/samples/each-block-keyed/expected.js
+++ b/test/js/samples/each-block-keyed/expected.js
@@ -24,7 +24,7 @@ function get_each_context(ctx, list, i) {
// (5:0) {#each things as thing (thing.id)}
function create_each_block(key_1, ctx) {
let div;
- let t_value = ctx[1].name + "";
+ let t_value = /*thing*/ ctx[1].name + "";
let t;
return {
@@ -40,7 +40,7 @@ function create_each_block(key_1, ctx) {
append(div, t);
},
p(ctx, dirty) {
- if (dirty & /* things */ 1 && t_value !== (t_value = ctx[1].name + "")) set_data(t, t_value);
+ if (dirty & /*things*/ 1 && t_value !== (t_value = /*thing*/ ctx[1].name + "")) set_data(t, t_value);
},
d(detaching) {
if (detaching) detach(div);
@@ -52,8 +52,8 @@ function create_fragment(ctx) {
let each_blocks = [];
let each_1_lookup = new Map();
let each_1_anchor;
- let each_value = ctx[0];
- const get_key = ctx => ctx[1].id;
+ let each_value = /*things*/ ctx[0];
+ const get_key = ctx => /*thing*/ ctx[1].id;
for (let i = 0; i < each_value.length; i += 1) {
let child_ctx = get_each_context(ctx, each_value, i);
@@ -77,7 +77,7 @@ function create_fragment(ctx) {
insert(target, each_1_anchor, anchor);
},
p(ctx, [dirty]) {
- const each_value = ctx[0];
+ const each_value = /*things*/ ctx[0];
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, each_1_anchor.parentNode, destroy_block, create_each_block, each_1_anchor, get_each_context);
},
i: noop,
diff --git a/test/js/samples/event-handler-dynamic/expected.js b/test/js/samples/event-handler-dynamic/expected.js
index 552c48f9dd..34c33151bf 100644
--- a/test/js/samples/event-handler-dynamic/expected.js
+++ b/test/js/samples/event-handler-dynamic/expected.js
@@ -37,16 +37,16 @@ function create_fragment(ctx) {
button1.textContent = "set handler 2";
t3 = space();
p1 = element("p");
- t4 = text(ctx[1]);
+ t4 = text(/*number*/ ctx[1]);
t5 = space();
button2 = element("button");
button2.textContent = "click";
dispose = [
- listen(button0, "click", ctx[2]),
- listen(button1, "click", ctx[3]),
+ listen(button0, "click", /*updateHandler1*/ ctx[2]),
+ listen(button1, "click", /*updateHandler2*/ ctx[3]),
listen(button2, "click", function () {
- ctx[0].apply(this, arguments);
+ /*clickHandler*/ ctx[0].apply(this, arguments);
})
];
},
@@ -63,7 +63,7 @@ function create_fragment(ctx) {
},
p(new_ctx, [dirty]) {
ctx = new_ctx;
- if (dirty & /* number */ 2) set_data(t4, ctx[1]);
+ if (dirty & /*number*/ 2) set_data(t4, /*number*/ ctx[1]);
},
i: noop,
o: noop,
diff --git a/test/js/samples/if-block-complex/expected.js b/test/js/samples/if-block-complex/expected.js
index a40e0e8afb..a8244de8b0 100644
--- a/test/js/samples/if-block-complex/expected.js
+++ b/test/js/samples/if-block-complex/expected.js
@@ -29,7 +29,7 @@ function create_if_block(ctx) {
}
function create_fragment(ctx) {
- let show_if = ctx[0].divider && ctx[0].divider.includes(1);
+ let show_if = /*item*/ ctx[0].divider && /*item*/ ctx[0].divider.includes(1);
let if_block_anchor;
let if_block = show_if && create_if_block(ctx);
diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js
index 5600712e5b..f225c221bf 100644
--- a/test/js/samples/if-block-no-update/expected.js
+++ b/test/js/samples/if-block-no-update/expected.js
@@ -49,7 +49,7 @@ function create_fragment(ctx) {
let if_block_anchor;
function select_block_type(ctx, dirty) {
- if (ctx[0]) return create_if_block;
+ if (/*foo*/ ctx[0]) return create_if_block;
return create_else_block;
}
diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js
index 9c1b6abd31..b9fad863e2 100644
--- a/test/js/samples/if-block-simple/expected.js
+++ b/test/js/samples/if-block-simple/expected.js
@@ -29,7 +29,7 @@ function create_if_block(ctx) {
function create_fragment(ctx) {
let if_block_anchor;
- let if_block = ctx[0] && create_if_block(ctx);
+ let if_block = /*foo*/ ctx[0] && create_if_block(ctx);
return {
c() {
@@ -41,7 +41,7 @@ function create_fragment(ctx) {
insert(target, if_block_anchor, anchor);
},
p(ctx, [dirty]) {
- if (ctx[0]) {
+ if (/*foo*/ ctx[0]) {
if (!if_block) {
if_block = create_if_block(ctx);
if_block.c();
diff --git a/test/js/samples/inline-style-optimized-multiple/expected.js b/test/js/samples/inline-style-optimized-multiple/expected.js
index ba173ffc38..84a38abd7b 100644
--- a/test/js/samples/inline-style-optimized-multiple/expected.js
+++ b/test/js/samples/inline-style-optimized-multiple/expected.js
@@ -16,19 +16,19 @@ function create_fragment(ctx) {
return {
c() {
div = element("div");
- set_style(div, "color", ctx[0]);
- set_style(div, "transform", "translate(" + ctx[1] + "px," + ctx[2] + "px)");
+ set_style(div, "color", /*color*/ ctx[0]);
+ set_style(div, "transform", "translate(" + /*x*/ ctx[1] + "px," + /*y*/ ctx[2] + "px)");
},
m(target, anchor) {
insert(target, div, anchor);
},
p(ctx, [dirty]) {
- if (dirty & /* color */ 1) {
- set_style(div, "color", ctx[0]);
+ if (dirty & /*color*/ 1) {
+ set_style(div, "color", /*color*/ ctx[0]);
}
- if (dirty & /* x, y */ 6) {
- set_style(div, "transform", "translate(" + ctx[1] + "px," + ctx[2] + "px)");
+ if (dirty & /*x, y*/ 6) {
+ set_style(div, "transform", "translate(" + /*x*/ ctx[1] + "px," + /*y*/ ctx[2] + "px)");
}
},
i: noop,
diff --git a/test/js/samples/inline-style-optimized-url/expected.js b/test/js/samples/inline-style-optimized-url/expected.js
index 862d16421f..77870348a5 100644
--- a/test/js/samples/inline-style-optimized-url/expected.js
+++ b/test/js/samples/inline-style-optimized-url/expected.js
@@ -16,14 +16,14 @@ function create_fragment(ctx) {
return {
c() {
div = element("div");
- set_style(div, "background", "url(data:image/png;base64," + ctx[0] + ")");
+ set_style(div, "background", "url(data:image/png;base64," + /*data*/ ctx[0] + ")");
},
m(target, anchor) {
insert(target, div, anchor);
},
p(ctx, [dirty]) {
- if (dirty & /* data */ 1) {
- set_style(div, "background", "url(data:image/png;base64," + ctx[0] + ")");
+ if (dirty & /*data*/ 1) {
+ set_style(div, "background", "url(data:image/png;base64," + /*data*/ ctx[0] + ")");
}
},
i: noop,
diff --git a/test/js/samples/inline-style-optimized/expected.js b/test/js/samples/inline-style-optimized/expected.js
index cf5241153c..5bef284f09 100644
--- a/test/js/samples/inline-style-optimized/expected.js
+++ b/test/js/samples/inline-style-optimized/expected.js
@@ -16,14 +16,14 @@ function create_fragment(ctx) {
return {
c() {
div = element("div");
- set_style(div, "color", ctx[0]);
+ set_style(div, "color", /*color*/ ctx[0]);
},
m(target, anchor) {
insert(target, div, anchor);
},
p(ctx, [dirty]) {
- if (dirty & /* color */ 1) {
- set_style(div, "color", ctx[0]);
+ if (dirty & /*color*/ 1) {
+ set_style(div, "color", /*color*/ ctx[0]);
}
},
i: noop,
diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js
index b31160fb7f..fdff685ead 100644
--- a/test/js/samples/inline-style-unoptimized/expected.js
+++ b/test/js/samples/inline-style-unoptimized/expected.js
@@ -22,8 +22,8 @@ function create_fragment(ctx) {
div0 = element("div");
t = space();
div1 = element("div");
- attr(div0, "style", ctx[0]);
- attr(div1, "style", div1_style_value = "" + (ctx[1] + ": " + ctx[2]));
+ attr(div0, "style", /*style*/ ctx[0]);
+ attr(div1, "style", div1_style_value = "" + (/*key*/ ctx[1] + ": " + /*value*/ ctx[2]));
},
m(target, anchor) {
insert(target, div0, anchor);
@@ -31,11 +31,11 @@ function create_fragment(ctx) {
insert(target, div1, anchor);
},
p(ctx, [dirty]) {
- if (dirty & /* style */ 1) {
- attr(div0, "style", ctx[0]);
+ if (dirty & /*style*/ 1) {
+ attr(div0, "style", /*style*/ ctx[0]);
}
- if (dirty & /* key, value */ 6 && div1_style_value !== (div1_style_value = "" + (ctx[1] + ": " + ctx[2]))) {
+ if (dirty & /*key, value*/ 6 && div1_style_value !== (div1_style_value = "" + (/*key*/ ctx[1] + ": " + /*value*/ ctx[2]))) {
attr(div1, "style", div1_style_value);
}
},
diff --git a/test/js/samples/input-files/expected.js b/test/js/samples/input-files/expected.js
index 08745fa730..c3e46f0c79 100644
--- a/test/js/samples/input-files/expected.js
+++ b/test/js/samples/input-files/expected.js
@@ -20,7 +20,7 @@ function create_fragment(ctx) {
input = element("input");
attr(input, "type", "file");
input.multiple = true;
- dispose = listen(input, "change", ctx[1]);
+ dispose = listen(input, "change", /*input_change_handler*/ ctx[1]);
},
m(target, anchor) {
insert(target, input, anchor);
diff --git a/test/js/samples/input-no-initial-value/expected.js b/test/js/samples/input-no-initial-value/expected.js
index 30deda64f1..8ff2b2798b 100644
--- a/test/js/samples/input-no-initial-value/expected.js
+++ b/test/js/samples/input-no-initial-value/expected.js
@@ -31,18 +31,22 @@ function create_fragment(ctx) {
button.textContent = "Store";
attr(input, "type", "text");
input.required = true;
- dispose = [listen(input, "input", ctx[2]), listen(form, "submit", ctx[1])];
+
+ dispose = [
+ listen(input, "input", /*input_input_handler*/ ctx[2]),
+ listen(form, "submit", /*handleSubmit*/ ctx[1])
+ ];
},
m(target, anchor) {
insert(target, form, anchor);
append(form, input);
- set_input_value(input, ctx[0]);
+ set_input_value(input, /*test*/ ctx[0]);
append(form, t0);
append(form, button);
},
p(ctx, [dirty]) {
- if (dirty & /* test */ 1 && input.value !== ctx[0]) {
- set_input_value(input, ctx[0]);
+ if (dirty & /*test*/ 1 && input.value !== /*test*/ ctx[0]) {
+ set_input_value(input, /*test*/ ctx[0]);
}
},
i: noop,
diff --git a/test/js/samples/input-range/expected.js b/test/js/samples/input-range/expected.js
index 85d784a17c..5a074d9754 100644
--- a/test/js/samples/input-range/expected.js
+++ b/test/js/samples/input-range/expected.js
@@ -22,15 +22,19 @@ function create_fragment(ctx) {
c() {
input = element("input");
attr(input, "type", "range");
- dispose = [listen(input, "change", ctx[1]), listen(input, "input", ctx[1])];
+
+ dispose = [
+ listen(input, "change", /*input_change_input_handler*/ ctx[1]),
+ listen(input, "input", /*input_change_input_handler*/ ctx[1])
+ ];
},
m(target, anchor) {
insert(target, input, anchor);
- set_input_value(input, ctx[0]);
+ set_input_value(input, /*value*/ ctx[0]);
},
p(ctx, [dirty]) {
- if (dirty & /* value */ 1) {
- set_input_value(input, ctx[0]);
+ if (dirty & /*value*/ 1) {
+ set_input_value(input, /*value*/ ctx[0]);
}
},
i: noop,
diff --git a/test/js/samples/input-without-blowback-guard/expected.js b/test/js/samples/input-without-blowback-guard/expected.js
index bc95660713..344976ade6 100644
--- a/test/js/samples/input-without-blowback-guard/expected.js
+++ b/test/js/samples/input-without-blowback-guard/expected.js
@@ -19,15 +19,15 @@ function create_fragment(ctx) {
c() {
input = element("input");
attr(input, "type", "checkbox");
- dispose = listen(input, "change", ctx[1]);
+ dispose = listen(input, "change", /*input_change_handler*/ ctx[1]);
},
m(target, anchor) {
insert(target, input, anchor);
- input.checked = ctx[0];
+ input.checked = /*foo*/ ctx[0];
},
p(ctx, [dirty]) {
- if (dirty & /* foo */ 1) {
- input.checked = ctx[0];
+ if (dirty & /*foo*/ 1) {
+ input.checked = /*foo*/ ctx[0];
}
},
i: noop,
diff --git a/test/js/samples/instrumentation-script-if-no-block/expected.js b/test/js/samples/instrumentation-script-if-no-block/expected.js
index 753b09031a..4127a6d7d6 100644
--- a/test/js/samples/instrumentation-script-if-no-block/expected.js
+++ b/test/js/samples/instrumentation-script-if-no-block/expected.js
@@ -29,8 +29,8 @@ function create_fragment(ctx) {
t1 = space();
p = element("p");
t2 = text("x: ");
- t3 = text(ctx[0]);
- dispose = listen(button, "click", ctx[1]);
+ t3 = text(/*x*/ ctx[0]);
+ dispose = listen(button, "click", /*foo*/ ctx[1]);
},
m(target, anchor) {
insert(target, button, anchor);
@@ -40,7 +40,7 @@ function create_fragment(ctx) {
append(p, t3);
},
p(ctx, [dirty]) {
- if (dirty & /* x */ 1) set_data(t3, ctx[0]);
+ if (dirty & /*x*/ 1) set_data(t3, /*x*/ ctx[0]);
},
i: noop,
o: noop,
diff --git a/test/js/samples/instrumentation-script-x-equals-x/expected.js b/test/js/samples/instrumentation-script-x-equals-x/expected.js
index d867e0cddb..0d4493baf3 100644
--- a/test/js/samples/instrumentation-script-x-equals-x/expected.js
+++ b/test/js/samples/instrumentation-script-x-equals-x/expected.js
@@ -19,7 +19,7 @@ function create_fragment(ctx) {
let t1;
let p;
let t2;
- let t3_value = ctx[0].length + "";
+ let t3_value = /*things*/ ctx[0].length + "";
let t3;
let dispose;
@@ -31,7 +31,7 @@ function create_fragment(ctx) {
p = element("p");
t2 = text("number of things: ");
t3 = text(t3_value);
- dispose = listen(button, "click", ctx[1]);
+ dispose = listen(button, "click", /*foo*/ ctx[1]);
},
m(target, anchor) {
insert(target, button, anchor);
@@ -41,7 +41,7 @@ function create_fragment(ctx) {
append(p, t3);
},
p(ctx, [dirty]) {
- if (dirty & /* things */ 1 && t3_value !== (t3_value = ctx[0].length + "")) set_data(t3, t3_value);
+ if (dirty & /*things*/ 1 && t3_value !== (t3_value = /*things*/ ctx[0].length + "")) set_data(t3, t3_value);
},
i: noop,
o: noop,
diff --git a/test/js/samples/instrumentation-template-if-no-block/expected.js b/test/js/samples/instrumentation-template-if-no-block/expected.js
index 3305db76cb..0bd627eb87 100644
--- a/test/js/samples/instrumentation-template-if-no-block/expected.js
+++ b/test/js/samples/instrumentation-template-if-no-block/expected.js
@@ -29,8 +29,8 @@ function create_fragment(ctx) {
t1 = space();
p = element("p");
t2 = text("x: ");
- t3 = text(ctx[0]);
- dispose = listen(button, "click", ctx[1]);
+ t3 = text(/*x*/ ctx[0]);
+ dispose = listen(button, "click", /*click_handler*/ ctx[1]);
},
m(target, anchor) {
insert(target, button, anchor);
@@ -40,7 +40,7 @@ function create_fragment(ctx) {
append(p, t3);
},
p(ctx, [dirty]) {
- if (dirty & /* x */ 1) set_data(t3, ctx[0]);
+ if (dirty & /*x*/ 1) set_data(t3, /*x*/ ctx[0]);
},
i: noop,
o: noop,
diff --git a/test/js/samples/instrumentation-template-x-equals-x/expected.js b/test/js/samples/instrumentation-template-x-equals-x/expected.js
index 6e9b20db6b..e049a6d39b 100644
--- a/test/js/samples/instrumentation-template-x-equals-x/expected.js
+++ b/test/js/samples/instrumentation-template-x-equals-x/expected.js
@@ -19,7 +19,7 @@ function create_fragment(ctx) {
let t1;
let p;
let t2;
- let t3_value = ctx[0].length + "";
+ let t3_value = /*things*/ ctx[0].length + "";
let t3;
let dispose;
@@ -31,7 +31,7 @@ function create_fragment(ctx) {
p = element("p");
t2 = text("number of things: ");
t3 = text(t3_value);
- dispose = listen(button, "click", ctx[1]);
+ dispose = listen(button, "click", /*click_handler*/ ctx[1]);
},
m(target, anchor) {
insert(target, button, anchor);
@@ -41,7 +41,7 @@ function create_fragment(ctx) {
append(p, t3);
},
p(ctx, [dirty]) {
- if (dirty & /* things */ 1 && t3_value !== (t3_value = ctx[0].length + "")) set_data(t3, t3_value);
+ if (dirty & /*things*/ 1 && t3_value !== (t3_value = /*things*/ ctx[0].length + "")) set_data(t3, t3_value);
},
i: noop,
o: noop,
diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js
index 11201eb4be..bfb1b8911d 100644
--- a/test/js/samples/media-bindings/expected.js
+++ b/test/js/samples/media-bindings/expected.js
@@ -29,59 +29,59 @@ function create_fragment(ctx) {
audio_updating = true;
}
- ctx[10].call(audio);
+ /*audio_timeupdate_handler*/ ctx[10].call(audio);
}
return {
c() {
audio = element("audio");
- if (ctx[2] === void 0 || ctx[3] === void 0 || ctx[9] === void 0) add_render_callback(audio_timeupdate_handler);
- if (ctx[4] === void 0) add_render_callback(() => ctx[11].call(audio));
- if (ctx[0] === void 0) add_render_callback(() => ctx[13].call(audio));
- if (ctx[0] === void 0 || ctx[1] === void 0) add_render_callback(() => ctx[14].call(audio));
- if (ctx[8] === void 0) add_render_callback(() => ctx[17].call(audio));
- if (ctx[9] === void 0) add_render_callback(() => ctx[18].call(audio));
+ if (/*played*/ ctx[2] === void 0 || /*currentTime*/ ctx[3] === void 0 || /*ended*/ ctx[9] === void 0) add_render_callback(audio_timeupdate_handler);
+ if (/*duration*/ ctx[4] === void 0) add_render_callback(() => /*audio_durationchange_handler*/ ctx[11].call(audio));
+ if (/*buffered*/ ctx[0] === void 0) add_render_callback(() => /*audio_progress_handler*/ ctx[13].call(audio));
+ if (/*buffered*/ ctx[0] === void 0 || /*seekable*/ ctx[1] === void 0) add_render_callback(() => /*audio_loadedmetadata_handler*/ ctx[14].call(audio));
+ if (/*seeking*/ ctx[8] === void 0) add_render_callback(() => /*audio_seeking_seeked_handler*/ ctx[17].call(audio));
+ if (/*ended*/ ctx[9] === void 0) add_render_callback(() => /*audio_ended_handler*/ ctx[18].call(audio));
dispose = [
listen(audio, "timeupdate", audio_timeupdate_handler),
- listen(audio, "durationchange", ctx[11]),
- listen(audio, "play", ctx[12]),
- listen(audio, "pause", ctx[12]),
- listen(audio, "progress", ctx[13]),
- listen(audio, "loadedmetadata", ctx[14]),
- listen(audio, "volumechange", ctx[15]),
- listen(audio, "ratechange", ctx[16]),
- listen(audio, "seeking", ctx[17]),
- listen(audio, "seeked", ctx[17]),
- listen(audio, "ended", ctx[18])
+ listen(audio, "durationchange", /*audio_durationchange_handler*/ ctx[11]),
+ listen(audio, "play", /*audio_play_pause_handler*/ ctx[12]),
+ listen(audio, "pause", /*audio_play_pause_handler*/ ctx[12]),
+ listen(audio, "progress", /*audio_progress_handler*/ ctx[13]),
+ listen(audio, "loadedmetadata", /*audio_loadedmetadata_handler*/ ctx[14]),
+ listen(audio, "volumechange", /*audio_volumechange_handler*/ ctx[15]),
+ listen(audio, "ratechange", /*audio_ratechange_handler*/ ctx[16]),
+ listen(audio, "seeking", /*audio_seeking_seeked_handler*/ ctx[17]),
+ listen(audio, "seeked", /*audio_seeking_seeked_handler*/ ctx[17]),
+ listen(audio, "ended", /*audio_ended_handler*/ ctx[18])
];
},
m(target, anchor) {
insert(target, audio, anchor);
- if (!isNaN(ctx[6])) {
- audio.volume = ctx[6];
+ if (!isNaN(/*volume*/ ctx[6])) {
+ audio.volume = /*volume*/ ctx[6];
}
- if (!isNaN(ctx[7])) {
- audio.playbackRate = ctx[7];
+ if (!isNaN(/*playbackRate*/ ctx[7])) {
+ audio.playbackRate = /*playbackRate*/ ctx[7];
}
},
p(ctx, [dirty]) {
- if (!audio_updating && dirty & /* currentTime */ 8 && !isNaN(ctx[3])) {
- audio.currentTime = ctx[3];
+ if (!audio_updating && dirty & /*currentTime*/ 8 && !isNaN(/*currentTime*/ ctx[3])) {
+ audio.currentTime = /*currentTime*/ ctx[3];
}
- if (dirty & /* paused */ 32 && audio_is_paused !== (audio_is_paused = ctx[5])) {
+ if (dirty & /*paused*/ 32 && audio_is_paused !== (audio_is_paused = /*paused*/ ctx[5])) {
audio[audio_is_paused ? "pause" : "play"]();
}
- if (dirty & /* volume */ 64 && !isNaN(ctx[6])) {
- audio.volume = ctx[6];
+ if (dirty & /*volume*/ 64 && !isNaN(/*volume*/ ctx[6])) {
+ audio.volume = /*volume*/ ctx[6];
}
- if (dirty & /* playbackRate */ 128 && !isNaN(ctx[7])) {
- audio.playbackRate = ctx[7];
+ if (dirty & /*playbackRate*/ 128 && !isNaN(/*playbackRate*/ ctx[7])) {
+ audio.playbackRate = /*playbackRate*/ ctx[7];
}
audio_updating = false;
diff --git a/test/js/samples/reactive-values-non-topologically-ordered/expected.js b/test/js/samples/reactive-values-non-topologically-ordered/expected.js
index 8b7cbf3442..3d266f10ac 100644
--- a/test/js/samples/reactive-values-non-topologically-ordered/expected.js
+++ b/test/js/samples/reactive-values-non-topologically-ordered/expected.js
@@ -11,11 +11,11 @@ function instance($$self, $$props, $$invalidate) {
};
$$self.$$.update = () => {
- if ($$self.$$.dirty & /* x */ 1) {
+ if ($$self.$$.dirty & /*x*/ 1) {
$: $$invalidate(2, b = x);
}
- if ($$self.$$.dirty & /* b */ 4) {
+ if ($$self.$$.dirty & /*b*/ 4) {
$: a = b;
}
};
diff --git a/test/js/samples/reactive-values-non-writable-dependencies/expected.js b/test/js/samples/reactive-values-non-writable-dependencies/expected.js
index 4a53580adc..38bd356d85 100644
--- a/test/js/samples/reactive-values-non-writable-dependencies/expected.js
+++ b/test/js/samples/reactive-values-non-writable-dependencies/expected.js
@@ -11,7 +11,7 @@ function instance($$self, $$props, $$invalidate) {
};
$$self.$$.update = () => {
- if ($$self.$$.dirty & /* a, b */ 3) {
+ if ($$self.$$.dirty & /*a, b*/ 3) {
$: console.log("max", Math.max(a, b));
}
};
diff --git a/test/js/samples/select-dynamic-value/expected.js b/test/js/samples/select-dynamic-value/expected.js
index d9102dbb38..a93a47bd3a 100644
--- a/test/js/samples/select-dynamic-value/expected.js
+++ b/test/js/samples/select-dynamic-value/expected.js
@@ -32,7 +32,7 @@ function create_fragment(ctx) {
insert(target, select, anchor);
append(select, option0);
append(select, option1);
- select_value_value = ctx[0];
+ select_value_value = /*current*/ ctx[0];
for (var i = 0; i < select.options.length; i += 1) {
var option = select.options[i];
@@ -44,7 +44,7 @@ function create_fragment(ctx) {
}
},
p(ctx, [dirty]) {
- if (dirty & /* current */ 1 && select_value_value !== (select_value_value = ctx[0])) {
+ if (dirty & /*current*/ 1 && select_value_value !== (select_value_value = /*current*/ ctx[0])) {
for (var i = 0; i < select.options.length; i += 1) {
var option = select.options[i];
diff --git a/test/js/samples/src-attribute-check/expected.js b/test/js/samples/src-attribute-check/expected.js
index 23ed56772e..e03b3a6ba7 100644
--- a/test/js/samples/src-attribute-check/expected.js
+++ b/test/js/samples/src-attribute-check/expected.js
@@ -35,9 +35,9 @@ function create_fragment(ctx) {
},
h() {
attr(img0, "alt", "potato");
- if (img0.src !== (img0_src_value = ctx[0])) attr(img0, "src", img0_src_value);
+ if (img0.src !== (img0_src_value = /*url*/ ctx[0])) attr(img0, "src", img0_src_value);
attr(img1, "alt", "potato");
- if (img1.src !== (img1_src_value = "" + (ctx[1] + ".jpg"))) attr(img1, "src", img1_src_value);
+ if (img1.src !== (img1_src_value = "" + (/*slug*/ ctx[1] + ".jpg"))) attr(img1, "src", img1_src_value);
},
m(target, anchor) {
insert(target, img0, anchor);
@@ -45,11 +45,11 @@ function create_fragment(ctx) {
insert(target, img1, anchor);
},
p(ctx, [dirty]) {
- if (dirty & /* url */ 1 && img0.src !== (img0_src_value = ctx[0])) {
+ if (dirty & /*url*/ 1 && img0.src !== (img0_src_value = /*url*/ ctx[0])) {
attr(img0, "src", img0_src_value);
}
- if (dirty & /* slug */ 2 && img1.src !== (img1_src_value = "" + (ctx[1] + ".jpg"))) {
+ if (dirty & /*slug*/ 2 && img1.src !== (img1_src_value = "" + (/*slug*/ ctx[1] + ".jpg"))) {
attr(img1, "src", img1_src_value);
}
},
diff --git a/test/js/samples/title/expected.js b/test/js/samples/title/expected.js
index 06755a7f97..d4e7e1a584 100644
--- a/test/js/samples/title/expected.js
+++ b/test/js/samples/title/expected.js
@@ -3,13 +3,13 @@ import { SvelteComponent, init, noop, safe_not_equal } from "svelte/internal";
function create_fragment(ctx) {
let title_value;
- document.title = title_value = "a " + ctx[0] + " title";
+ document.title = title_value = "a " + /*custom*/ ctx[0] + " title";
return {
c: noop,
m: noop,
p(ctx, [dirty]) {
- if (dirty & /* custom */ 1 && title_value !== (title_value = "a " + ctx[0] + " title")) {
+ if (dirty & /*custom*/ 1 && title_value !== (title_value = "a " + /*custom*/ ctx[0] + " title")) {
document.title = title_value;
}
},
diff --git a/test/js/samples/transition-local/expected.js b/test/js/samples/transition-local/expected.js
index 8d72e74718..a5d3b6318f 100644
--- a/test/js/samples/transition-local/expected.js
+++ b/test/js/samples/transition-local/expected.js
@@ -15,7 +15,7 @@ import {
function create_if_block(ctx) {
let if_block_anchor;
- let if_block = ctx[1] && create_if_block_1(ctx);
+ let if_block = /*y*/ ctx[1] && create_if_block_1(ctx);
return {
c() {
@@ -27,7 +27,7 @@ function create_if_block(ctx) {
insert(target, if_block_anchor, anchor);
},
p(ctx, dirty) {
- if (ctx[1]) {
+ if (/*y*/ ctx[1]) {
if (!if_block) {
if_block = create_if_block_1(ctx);
if_block.c();
@@ -80,7 +80,7 @@ function create_if_block_1(ctx) {
function create_fragment(ctx) {
let if_block_anchor;
- let if_block = ctx[0] && create_if_block(ctx);
+ let if_block = /*x*/ ctx[0] && create_if_block(ctx);
return {
c() {
@@ -92,7 +92,7 @@ function create_fragment(ctx) {
insert(target, if_block_anchor, anchor);
},
p(ctx, [dirty]) {
- if (ctx[0]) {
+ if (/*x*/ ctx[0]) {
if (if_block) {
if_block.p(ctx, dirty);
} else {
diff --git a/test/js/samples/transition-repeated-outro/expected.js b/test/js/samples/transition-repeated-outro/expected.js
index 536cb95b2c..6f071328a4 100644
--- a/test/js/samples/transition-repeated-outro/expected.js
+++ b/test/js/samples/transition-repeated-outro/expected.js
@@ -49,7 +49,7 @@ function create_if_block(ctx) {
function create_fragment(ctx) {
let if_block_anchor;
let current;
- let if_block = ctx[0] < 5 && create_if_block(ctx);
+ let if_block = /*num*/ ctx[0] < 5 && create_if_block(ctx);
return {
c() {
@@ -62,7 +62,7 @@ function create_fragment(ctx) {
current = true;
},
p(ctx, [dirty]) {
- if (ctx[0] < 5) {
+ if (/*num*/ ctx[0] < 5) {
if (!if_block) {
if_block = create_if_block(ctx);
if_block.c();
diff --git a/test/js/samples/unchanged-expression/expected.js b/test/js/samples/unchanged-expression/expected.js
index 3539d115d6..673d5b6abc 100644
--- a/test/js/samples/unchanged-expression/expected.js
+++ b/test/js/samples/unchanged-expression/expected.js
@@ -41,7 +41,7 @@ function create_fragment(ctx) {
div1 = element("div");
p3 = element("p");
t8 = text("Hello ");
- t9 = text(ctx[0]);
+ t9 = text(/*world3*/ ctx[0]);
},
m(target, anchor) {
insert(target, div0, anchor);
@@ -57,7 +57,7 @@ function create_fragment(ctx) {
append(p3, t9);
},
p(ctx, [dirty]) {
- if (dirty & /* world3 */ 1) set_data(t9, ctx[0]);
+ if (dirty & /*world3*/ 1) set_data(t9, /*world3*/ ctx[0]);
},
i: noop,
o: noop,
diff --git a/test/js/samples/unreferenced-state-not-invalidated/expected.js b/test/js/samples/unreferenced-state-not-invalidated/expected.js
index ff3c3e597f..b10ea815b9 100644
--- a/test/js/samples/unreferenced-state-not-invalidated/expected.js
+++ b/test/js/samples/unreferenced-state-not-invalidated/expected.js
@@ -21,14 +21,14 @@ function create_fragment(ctx) {
return {
c() {
p = element("p");
- t = text(ctx[0]);
+ t = text(/*y*/ ctx[0]);
},
m(target, anchor) {
insert(target, p, anchor);
append(p, t);
},
p(ctx, [dirty]) {
- if (dirty & /* y */ 1) set_data(t, ctx[0]);
+ if (dirty & /*y*/ 1) set_data(t, /*y*/ ctx[0]);
},
i: noop,
o: noop,
@@ -58,7 +58,7 @@ function instance($$self, $$props, $$invalidate) {
let y;
$$self.$$.update = () => {
- if ($$self.$$.dirty & /* b */ 2) {
+ if ($$self.$$.dirty & /*b*/ 2) {
$: $$invalidate(0, y = b * 2);
}
};
diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js
index 36344982bc..52635e9b78 100644
--- a/test/js/samples/use-elements-as-anchors/expected.js
+++ b/test/js/samples/use-elements-as-anchors/expected.js
@@ -112,11 +112,11 @@ function create_fragment(ctx) {
let t6;
let t7;
let if_block4_anchor;
- let if_block0 = ctx[0] && create_if_block_4(ctx);
- let if_block1 = ctx[1] && create_if_block_3(ctx);
- let if_block2 = ctx[2] && create_if_block_2(ctx);
- let if_block3 = ctx[3] && create_if_block_1(ctx);
- let if_block4 = ctx[4] && create_if_block(ctx);
+ let if_block0 = /*a*/ ctx[0] && create_if_block_4(ctx);
+ let if_block1 = /*b*/ ctx[1] && create_if_block_3(ctx);
+ let if_block2 = /*c*/ ctx[2] && create_if_block_2(ctx);
+ let if_block3 = /*d*/ ctx[3] && create_if_block_1(ctx);
+ let if_block4 = /*e*/ ctx[4] && create_if_block(ctx);
return {
c() {
@@ -156,7 +156,7 @@ function create_fragment(ctx) {
insert(target, if_block4_anchor, anchor);
},
p(ctx, [dirty]) {
- if (ctx[0]) {
+ if (/*a*/ ctx[0]) {
if (!if_block0) {
if_block0 = create_if_block_4(ctx);
if_block0.c();
@@ -169,7 +169,7 @@ function create_fragment(ctx) {
if_block0 = null;
}
- if (ctx[1]) {
+ if (/*b*/ ctx[1]) {
if (!if_block1) {
if_block1 = create_if_block_3(ctx);
if_block1.c();
@@ -182,7 +182,7 @@ function create_fragment(ctx) {
if_block1 = null;
}
- if (ctx[2]) {
+ if (/*c*/ ctx[2]) {
if (!if_block2) {
if_block2 = create_if_block_2(ctx);
if_block2.c();
@@ -195,7 +195,7 @@ function create_fragment(ctx) {
if_block2 = null;
}
- if (ctx[3]) {
+ if (/*d*/ ctx[3]) {
if (!if_block3) {
if_block3 = create_if_block_1(ctx);
if_block3.c();
@@ -208,7 +208,7 @@ function create_fragment(ctx) {
if_block3 = null;
}
- if (ctx[4]) {
+ if (/*e*/ ctx[4]) {
if (!if_block4) {
if_block4 = create_if_block(ctx);
if_block4.c();
diff --git a/test/js/samples/video-bindings/expected.js b/test/js/samples/video-bindings/expected.js
index 0b318bddc0..e3d48f9922 100644
--- a/test/js/samples/video-bindings/expected.js
+++ b/test/js/samples/video-bindings/expected.js
@@ -29,27 +29,27 @@ function create_fragment(ctx) {
video_updating = true;
}
- ctx[5].call(video);
+ /*video_timeupdate_handler*/ ctx[5].call(video);
}
return {
c() {
video = element("video");
- add_render_callback(() => ctx[4].call(video));
- if (ctx[1] === void 0 || ctx[2] === void 0) add_render_callback(() => ctx[6].call(video));
+ add_render_callback(() => /*video_elementresize_handler*/ ctx[4].call(video));
+ if (/*videoHeight*/ ctx[1] === void 0 || /*videoWidth*/ ctx[2] === void 0) add_render_callback(() => /*video_resize_handler*/ ctx[6].call(video));
dispose = [
listen(video, "timeupdate", video_timeupdate_handler),
- listen(video, "resize", ctx[6])
+ listen(video, "resize", /*video_resize_handler*/ ctx[6])
];
},
m(target, anchor) {
insert(target, video, anchor);
- video_resize_listener = add_resize_listener(video, ctx[4].bind(video));
+ video_resize_listener = add_resize_listener(video, /*video_elementresize_handler*/ ctx[4].bind(video));
},
p(ctx, [dirty]) {
- if (!video_updating && dirty & /* currentTime */ 1 && !isNaN(ctx[0])) {
- video.currentTime = ctx[0];
+ if (!video_updating && dirty & /*currentTime*/ 1 && !isNaN(/*currentTime*/ ctx[0])) {
+ video.currentTime = /*currentTime*/ ctx[0];
}
video_updating = false;
diff --git a/test/js/samples/window-binding-online/expected.js b/test/js/samples/window-binding-online/expected.js
index a2e0c0b89d..8285646481 100644
--- a/test/js/samples/window-binding-online/expected.js
+++ b/test/js/samples/window-binding-online/expected.js
@@ -11,11 +11,14 @@ import {
function create_fragment(ctx) {
let dispose;
- add_render_callback(ctx[1]);
+ add_render_callback(/*onlinestatuschanged*/ ctx[1]);
return {
c() {
- dispose = [listen(window, "online", ctx[1]), listen(window, "offline", ctx[1])];
+ dispose = [
+ listen(window, "online", /*onlinestatuschanged*/ ctx[1]),
+ listen(window, "offline", /*onlinestatuschanged*/ ctx[1])
+ ];
},
m: noop,
p: noop,
diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js
index b7b4603356..f79212e25e 100644
--- a/test/js/samples/window-binding-scroll/expected.js
+++ b/test/js/samples/window-binding-scroll/expected.js
@@ -26,19 +26,19 @@ function create_fragment(ctx) {
let t0;
let t1;
let dispose;
- add_render_callback(ctx[1]);
+ add_render_callback(/*onwindowscroll*/ ctx[1]);
return {
c() {
p = element("p");
t0 = text("scrolled to ");
- t1 = text(ctx[0]);
+ t1 = text(/*y*/ ctx[0]);
dispose = listen(window, "scroll", () => {
scrolling = true;
clearTimeout(scrolling_timeout);
scrolling_timeout = setTimeout(clear_scrolling, 100);
- ctx[1]();
+ /*onwindowscroll*/ ctx[1]();
});
},
m(target, anchor) {
@@ -47,14 +47,14 @@ function create_fragment(ctx) {
append(p, t1);
},
p(ctx, [dirty]) {
- if (dirty & /* y */ 1 && !scrolling) {
+ if (dirty & /*y*/ 1 && !scrolling) {
scrolling = true;
clearTimeout(scrolling_timeout);
- scrollTo(window.pageXOffset, ctx[0]);
+ scrollTo(window.pageXOffset, /*y*/ ctx[0]);
scrolling_timeout = setTimeout(clear_scrolling, 100);
}
- if (dirty & /* y */ 1) set_data(t1, ctx[0]);
+ if (dirty & /*y*/ 1) set_data(t1, /*y*/ ctx[0]);
},
i: noop,
o: noop,