From cd7128a1541743ff735c9af2f6c1dfa0c784639c Mon Sep 17 00:00:00 2001 From: Andrew Shu Date: Sun, 3 Sep 2017 21:59:13 -0700 Subject: [PATCH 1/2] update tests --- .../expected-bundle.js | 8 ++-- .../expected.js | 8 ++-- .../css-media-query/expected-bundle.js | 8 ++-- test/js/samples/css-media-query/expected.js | 8 ++-- .../custom-element-basic/expected-bundle.js | 6 +-- .../samples/custom-element-basic/expected.js | 6 +-- .../custom-element-slot/expected-bundle.js | 22 +++++----- .../samples/custom-element-slot/expected.js | 22 +++++----- .../custom-element-styled/expected-bundle.js | 6 +-- .../samples/custom-element-styled/expected.js | 6 +-- .../expected-bundle.js | 20 ++++----- .../each-block-changed-check/expected.js | 20 ++++----- .../event-handlers-custom/expected-bundle.js | 6 +-- .../samples/event-handlers-custom/expected.js | 6 +-- .../if-block-no-update/expected-bundle.js | 12 ++--- .../js/samples/if-block-no-update/expected.js | 12 ++--- .../if-block-simple/expected-bundle.js | 6 +-- test/js/samples/if-block-simple/expected.js | 6 +-- .../expected-bundle.js | 6 +-- .../expected.js | 6 +-- .../expected-bundle.js | 6 +-- .../inline-style-optimized-url/expected.js | 6 +-- .../inline-style-optimized/expected-bundle.js | 6 +-- .../inline-style-optimized/expected.js | 6 +-- .../expected-bundle.js | 12 ++--- .../inline-style-unoptimized/expected.js | 12 ++--- .../expected-bundle.js | 6 +-- .../input-without-blowback-guard/expected.js | 6 +-- .../legacy-input-type/expected-bundle.js | 6 +-- test/js/samples/legacy-input-type/expected.js | 6 +-- .../expected-bundle.js | 44 +++++++++---------- .../use-elements-as-anchors/expected.js | 44 +++++++++---------- 32 files changed, 180 insertions(+), 180 deletions(-) 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 94f831b653..780afda754 100644 --- a/test/js/samples/collapses-text-around-comments/expected-bundle.js +++ b/test/js/samples/collapses-text-around-comments/expected-bundle.js @@ -199,17 +199,17 @@ function create_main_fragment(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText(state.foo); this.hydrate(); }, hydrate: function(nodes) { - encapsulateStyles( p ); + encapsulateStyles(p); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, @@ -220,7 +220,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index 317cd6ad63..60ca5c2f15 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -24,17 +24,17 @@ function create_main_fragment(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText(state.foo); this.hydrate(); }, hydrate: function(nodes) { - encapsulateStyles( p ); + encapsulateStyles(p); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, @@ -45,7 +45,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop diff --git a/test/js/samples/css-media-query/expected-bundle.js b/test/js/samples/css-media-query/expected-bundle.js index ecbb9be904..c57250e9f2 100644 --- a/test/js/samples/css-media-query/expected-bundle.js +++ b/test/js/samples/css-media-query/expected-bundle.js @@ -187,22 +187,22 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); + div = createElement("div"); this.hydrate(); }, hydrate: function(nodes) { - encapsulateStyles( div ); + encapsulateStyles(div); }, mount: function(target, anchor) { - insertNode( div, target, anchor ); + insertNode(div, target, anchor); }, update: noop, unmount: function() { - detachNode( div ); + detachNode(div); }, destroy: noop diff --git a/test/js/samples/css-media-query/expected.js b/test/js/samples/css-media-query/expected.js index b707ddcd3d..0e75dc09d8 100644 --- a/test/js/samples/css-media-query/expected.js +++ b/test/js/samples/css-media-query/expected.js @@ -16,22 +16,22 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); + div = createElement("div"); this.hydrate(); }, hydrate: function(nodes) { - encapsulateStyles( div ); + encapsulateStyles(div); }, mount: function(target, anchor) { - insertNode( div, target, anchor ); + insertNode(div, target, anchor); }, update: noop, unmount: function() { - detachNode( div ); + detachNode(div); }, destroy: noop diff --git a/test/js/samples/custom-element-basic/expected-bundle.js b/test/js/samples/custom-element-basic/expected-bundle.js index 9ba64bae1a..bd1a063877 100644 --- a/test/js/samples/custom-element-basic/expected-bundle.js +++ b/test/js/samples/custom-element-basic/expected-bundle.js @@ -176,14 +176,14 @@ function create_main_fragment(state, component) { return { create: function() { - h1 = createElement( 'h1' ); + h1 = createElement("h1"); text = createText("Hello "); text_1 = createText(state.name); text_2 = createText("!"); }, mount: function(target, anchor) { - insertNode( h1, target, anchor ); + insertNode(h1, target, anchor); appendNode(text, h1); appendNode(text_1, h1); appendNode(text_2, h1); @@ -196,7 +196,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( h1 ); + detachNode(h1); }, destroy: noop diff --git a/test/js/samples/custom-element-basic/expected.js b/test/js/samples/custom-element-basic/expected.js index bf35272e52..d7b2514940 100644 --- a/test/js/samples/custom-element-basic/expected.js +++ b/test/js/samples/custom-element-basic/expected.js @@ -5,14 +5,14 @@ function create_main_fragment(state, component) { return { create: function() { - h1 = createElement( 'h1' ); + h1 = createElement("h1"); text = createText("Hello "); text_1 = createText(state.name); text_2 = createText("!"); }, mount: function(target, anchor) { - insertNode( h1, target, anchor ); + insertNode(h1, target, anchor); appendNode(text, h1); appendNode(text_1, h1); appendNode(text_2, h1); @@ -25,7 +25,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( h1 ); + detachNode(h1); }, destroy: noop diff --git a/test/js/samples/custom-element-slot/expected-bundle.js b/test/js/samples/custom-element-slot/expected-bundle.js index 57a46aa8b9..8667a5d672 100644 --- a/test/js/samples/custom-element-slot/expected-bundle.js +++ b/test/js/samples/custom-element-slot/expected-bundle.js @@ -180,13 +180,13 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); - slot = createElement( 'slot' ); - p = createElement( 'p' ); + div = createElement("div"); + slot = createElement("slot"); + p = createElement("p"); text = createText("default fallback content"); text_2 = createText("\n\n\t"); - slot_1 = createElement( 'slot' ); - p_1 = createElement( 'p' ); + slot_1 = createElement("slot"); + p_1 = createElement("p"); text_3 = createText("foo fallback content"); this.hydrate(); }, @@ -196,20 +196,20 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); - appendNode( slot, div ); - appendNode( p, slot ); + insertNode(div, target, anchor); + appendNode(slot, div); + appendNode(p, slot); appendNode(text, p); appendNode(text_2, div); - appendNode( slot_1, div ); - appendNode( p_1, slot_1 ); + appendNode(slot_1, div); + appendNode(p_1, slot_1); appendNode(text_3, p_1); }, update: noop, unmount: function() { - detachNode( div ); + detachNode(div); }, destroy: noop diff --git a/test/js/samples/custom-element-slot/expected.js b/test/js/samples/custom-element-slot/expected.js index b2d31b62bf..b64c7e6838 100644 --- a/test/js/samples/custom-element-slot/expected.js +++ b/test/js/samples/custom-element-slot/expected.js @@ -5,13 +5,13 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); - slot = createElement( 'slot' ); - p = createElement( 'p' ); + div = createElement("div"); + slot = createElement("slot"); + p = createElement("p"); text = createText("default fallback content"); text_2 = createText("\n\n\t"); - slot_1 = createElement( 'slot' ); - p_1 = createElement( 'p' ); + slot_1 = createElement("slot"); + p_1 = createElement("p"); text_3 = createText("foo fallback content"); this.hydrate(); }, @@ -21,20 +21,20 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); - appendNode( slot, div ); - appendNode( p, slot ); + insertNode(div, target, anchor); + appendNode(slot, div); + appendNode(p, slot); appendNode(text, p); appendNode(text_2, div); - appendNode( slot_1, div ); - appendNode( p_1, slot_1 ); + appendNode(slot_1, div); + appendNode(p_1, slot_1); appendNode(text_3, p_1); }, update: noop, unmount: function() { - detachNode( div ); + detachNode(div); }, destroy: noop diff --git a/test/js/samples/custom-element-styled/expected-bundle.js b/test/js/samples/custom-element-styled/expected-bundle.js index a7cb0c6f02..1ef76c5aae 100644 --- a/test/js/samples/custom-element-styled/expected-bundle.js +++ b/test/js/samples/custom-element-styled/expected-bundle.js @@ -176,14 +176,14 @@ function create_main_fragment(state, component) { return { create: function() { - h1 = createElement( 'h1' ); + h1 = createElement("h1"); text = createText("Hello "); text_1 = createText(state.name); text_2 = createText("!"); }, mount: function(target, anchor) { - insertNode( h1, target, anchor ); + insertNode(h1, target, anchor); appendNode(text, h1); appendNode(text_1, h1); appendNode(text_2, h1); @@ -196,7 +196,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( h1 ); + detachNode(h1); }, destroy: noop diff --git a/test/js/samples/custom-element-styled/expected.js b/test/js/samples/custom-element-styled/expected.js index 14d17bad20..8d53597042 100644 --- a/test/js/samples/custom-element-styled/expected.js +++ b/test/js/samples/custom-element-styled/expected.js @@ -5,14 +5,14 @@ function create_main_fragment(state, component) { return { create: function() { - h1 = createElement( 'h1' ); + h1 = createElement("h1"); text = createText("Hello "); text_1 = createText(state.name); text_2 = createText("!"); }, mount: function(target, anchor) { - insertNode( h1, target, anchor ); + insertNode(h1, target, anchor); appendNode(text, h1); appendNode(text_1, h1); appendNode(text_2, h1); @@ -25,7 +25,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( h1 ); + detachNode(h1); }, destroy: noop 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 f3d5a2423c..cdea1b775e 100644 --- a/test/js/samples/each-block-changed-check/expected-bundle.js +++ b/test/js/samples/each-block-changed-check/expected-bundle.js @@ -202,7 +202,7 @@ function create_main_fragment(state, component) { } text = createText("\n\n"); - p = createElement( 'p' ); + p = createElement("p"); text_1 = createText(state.foo); }, @@ -212,7 +212,7 @@ function create_main_fragment(state, component) { } insertNode(text, target, anchor); - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text_1, p); }, @@ -248,7 +248,7 @@ function create_main_fragment(state, component) { } detachNode(text); - detachNode( p ); + detachNode(p); }, destroy: function() { @@ -262,11 +262,11 @@ function create_each_block(state, each_block_value, comment, i, component) { return { create: function() { - div = createElement( 'div' ); - strong = createElement( 'strong' ); + div = createElement("div"); + strong = createElement("strong"); text = createText(i); text_1 = createText("\n\n\t\t"); - span = createElement( 'span' ); + span = createElement("span"); text_2 = createText(text_2_value); text_3 = createText(" wrote "); text_4 = createText(text_4_value); @@ -282,11 +282,11 @@ function create_each_block(state, each_block_value, comment, i, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); - appendNode( strong, div ); + insertNode(div, target, anchor); + appendNode(strong, div); appendNode(text, strong); appendNode(text_1, div); - appendNode( span, div ); + appendNode(span, div); appendNode(text_2, span); appendNode(text_3, span); appendNode(text_4, span); @@ -314,7 +314,7 @@ function create_each_block(state, each_block_value, comment, i, component) { unmount: function() { detachAfter(raw_before); - detachNode( div ); + detachNode(div); }, destroy: noop diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index 95d70a38a5..7e11a597b4 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -18,7 +18,7 @@ function create_main_fragment(state, component) { } text = createText("\n\n"); - p = createElement( 'p' ); + p = createElement("p"); text_1 = createText(state.foo); }, @@ -28,7 +28,7 @@ function create_main_fragment(state, component) { } insertNode(text, target, anchor); - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text_1, p); }, @@ -64,7 +64,7 @@ function create_main_fragment(state, component) { } detachNode(text); - detachNode( p ); + detachNode(p); }, destroy: function() { @@ -78,11 +78,11 @@ function create_each_block(state, each_block_value, comment, i, component) { return { create: function() { - div = createElement( 'div' ); - strong = createElement( 'strong' ); + div = createElement("div"); + strong = createElement("strong"); text = createText(i); text_1 = createText("\n\n\t\t"); - span = createElement( 'span' ); + span = createElement("span"); text_2 = createText(text_2_value); text_3 = createText(" wrote "); text_4 = createText(text_4_value); @@ -98,11 +98,11 @@ function create_each_block(state, each_block_value, comment, i, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); - appendNode( strong, div ); + insertNode(div, target, anchor); + appendNode(strong, div); appendNode(text, strong); appendNode(text_1, div); - appendNode( span, div ); + appendNode(span, div); appendNode(text_2, span); appendNode(text_3, span); appendNode(text_4, span); @@ -130,7 +130,7 @@ function create_each_block(state, each_block_value, comment, i, component) { unmount: function() { detachAfter(raw_before); - detachNode( div ); + detachNode(div); }, destroy: noop diff --git a/test/js/samples/event-handlers-custom/expected-bundle.js b/test/js/samples/event-handlers-custom/expected-bundle.js index 63684f82f3..c448b8fab3 100644 --- a/test/js/samples/event-handlers-custom/expected-bundle.js +++ b/test/js/samples/event-handlers-custom/expected-bundle.js @@ -191,7 +191,7 @@ function create_main_fragment(state, component) { return { create: function() { - button = createElement( 'button' ); + button = createElement("button"); text = createText("foo"); this.hydrate(); }, @@ -204,14 +204,14 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( button, target, anchor ); + insertNode(button, target, anchor); appendNode(text, button); }, update: noop, unmount: function() { - detachNode( button ); + detachNode(button); }, destroy: function() { diff --git a/test/js/samples/event-handlers-custom/expected.js b/test/js/samples/event-handlers-custom/expected.js index a77fb14f41..19599726aa 100644 --- a/test/js/samples/event-handlers-custom/expected.js +++ b/test/js/samples/event-handlers-custom/expected.js @@ -20,7 +20,7 @@ function create_main_fragment(state, component) { return { create: function() { - button = createElement( 'button' ); + button = createElement("button"); text = createText("foo"); this.hydrate(); }, @@ -33,14 +33,14 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( button, target, anchor ); + insertNode(button, target, anchor); appendNode(text, button); }, update: noop, unmount: function() { - detachNode( button ); + detachNode(button); }, destroy: function() { 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 b82f365515..8fdfa69489 100644 --- a/test/js/samples/if-block-no-update/expected-bundle.js +++ b/test/js/samples/if-block-no-update/expected-bundle.js @@ -218,17 +218,17 @@ function create_if_block(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("foo!"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop @@ -240,17 +240,17 @@ function create_if_block_1(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("not foo!"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js index 3e96153e96..ece28404c5 100644 --- a/test/js/samples/if-block-no-update/expected.js +++ b/test/js/samples/if-block-no-update/expected.js @@ -43,17 +43,17 @@ function create_if_block(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("foo!"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop @@ -65,17 +65,17 @@ function create_if_block_1(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("not foo!"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop diff --git a/test/js/samples/if-block-simple/expected-bundle.js b/test/js/samples/if-block-simple/expected-bundle.js index 018e56b330..3e7c5425c6 100644 --- a/test/js/samples/if-block-simple/expected-bundle.js +++ b/test/js/samples/if-block-simple/expected-bundle.js @@ -221,17 +221,17 @@ function create_if_block(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("foo!"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js index f862ea60fc..9fdca3bcd0 100644 --- a/test/js/samples/if-block-simple/expected.js +++ b/test/js/samples/if-block-simple/expected.js @@ -46,17 +46,17 @@ function create_if_block(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("foo!"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop 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 24b0d8b8bb..7e694cc03a 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected-bundle.js +++ b/test/js/samples/inline-style-optimized-multiple/expected-bundle.js @@ -172,7 +172,7 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); + div = createElement("div"); this.hydrate(); }, @@ -182,7 +182,7 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); + insertNode(div, target, anchor); }, update: function(changed, state) { @@ -196,7 +196,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( div ); + detachNode(div); }, destroy: noop diff --git a/test/js/samples/inline-style-optimized-multiple/expected.js b/test/js/samples/inline-style-optimized-multiple/expected.js index 8353abcf7c..69d5484a33 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected.js +++ b/test/js/samples/inline-style-optimized-multiple/expected.js @@ -5,7 +5,7 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); + div = createElement("div"); this.hydrate(); }, @@ -15,7 +15,7 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); + insertNode(div, target, anchor); }, update: function(changed, state) { @@ -29,7 +29,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( div ); + detachNode(div); }, destroy: noop 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 794c772a26..2d94be8c91 100644 --- a/test/js/samples/inline-style-optimized-url/expected-bundle.js +++ b/test/js/samples/inline-style-optimized-url/expected-bundle.js @@ -172,7 +172,7 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); + div = createElement("div"); this.hydrate(); }, @@ -181,7 +181,7 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); + insertNode(div, target, anchor); }, update: function(changed, state) { @@ -191,7 +191,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( div ); + detachNode(div); }, destroy: noop diff --git a/test/js/samples/inline-style-optimized-url/expected.js b/test/js/samples/inline-style-optimized-url/expected.js index 25e1c0e41e..b71ab726c7 100644 --- a/test/js/samples/inline-style-optimized-url/expected.js +++ b/test/js/samples/inline-style-optimized-url/expected.js @@ -5,7 +5,7 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); + div = createElement("div"); this.hydrate(); }, @@ -14,7 +14,7 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); + insertNode(div, target, anchor); }, update: function(changed, state) { @@ -24,7 +24,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( div ); + detachNode(div); }, destroy: noop diff --git a/test/js/samples/inline-style-optimized/expected-bundle.js b/test/js/samples/inline-style-optimized/expected-bundle.js index b3ae1daa0f..4e47a8fc3f 100644 --- a/test/js/samples/inline-style-optimized/expected-bundle.js +++ b/test/js/samples/inline-style-optimized/expected-bundle.js @@ -172,7 +172,7 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); + div = createElement("div"); this.hydrate(); }, @@ -181,7 +181,7 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); + insertNode(div, target, anchor); }, update: function(changed, state) { @@ -191,7 +191,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( div ); + detachNode(div); }, destroy: noop diff --git a/test/js/samples/inline-style-optimized/expected.js b/test/js/samples/inline-style-optimized/expected.js index 5ba0e80dff..630419b2dd 100644 --- a/test/js/samples/inline-style-optimized/expected.js +++ b/test/js/samples/inline-style-optimized/expected.js @@ -5,7 +5,7 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); + div = createElement("div"); this.hydrate(); }, @@ -14,7 +14,7 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); + insertNode(div, target, anchor); }, update: function(changed, state) { @@ -24,7 +24,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( div ); + detachNode(div); }, destroy: noop diff --git a/test/js/samples/inline-style-unoptimized/expected-bundle.js b/test/js/samples/inline-style-unoptimized/expected-bundle.js index b2cd05e09a..dbca449ebf 100644 --- a/test/js/samples/inline-style-unoptimized/expected-bundle.js +++ b/test/js/samples/inline-style-unoptimized/expected-bundle.js @@ -172,9 +172,9 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); + div = createElement("div"); text = createText("\n"); - div_1 = createElement( 'div' ); + div_1 = createElement("div"); this.hydrate(); }, @@ -184,9 +184,9 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); + insertNode(div, target, anchor); insertNode(text, target, anchor); - insertNode( div_1, target, anchor ); + insertNode(div_1, target, anchor); }, update: function(changed, state) { @@ -200,9 +200,9 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( div ); + detachNode(div); detachNode(text); - detachNode( div_1 ); + detachNode(div_1); }, destroy: noop diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js index 591c265398..c104be1b57 100644 --- a/test/js/samples/inline-style-unoptimized/expected.js +++ b/test/js/samples/inline-style-unoptimized/expected.js @@ -5,9 +5,9 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); + div = createElement("div"); text = createText("\n"); - div_1 = createElement( 'div' ); + div_1 = createElement("div"); this.hydrate(); }, @@ -17,9 +17,9 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); + insertNode(div, target, anchor); insertNode(text, target, anchor); - insertNode( div_1, target, anchor ); + insertNode(div_1, target, anchor); }, update: function(changed, state) { @@ -33,9 +33,9 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( div ); + detachNode(div); detachNode(text); - detachNode( div_1 ); + detachNode(div_1); }, destroy: noop 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 58f498a9bb..f713e26387 100644 --- a/test/js/samples/input-without-blowback-guard/expected-bundle.js +++ b/test/js/samples/input-without-blowback-guard/expected-bundle.js @@ -180,7 +180,7 @@ function create_main_fragment(state, component) { return { create: function() { - input = createElement( 'input' ); + input = createElement("input"); this.hydrate(); }, @@ -190,7 +190,7 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( input, target, anchor ); + insertNode(input, target, anchor); input.checked = state.foo; }, @@ -200,7 +200,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( input ); + detachNode(input); }, destroy: function() { diff --git a/test/js/samples/input-without-blowback-guard/expected.js b/test/js/samples/input-without-blowback-guard/expected.js index 067c9589e5..47b9478140 100644 --- a/test/js/samples/input-without-blowback-guard/expected.js +++ b/test/js/samples/input-without-blowback-guard/expected.js @@ -9,7 +9,7 @@ function create_main_fragment(state, component) { return { create: function() { - input = createElement( 'input' ); + input = createElement("input"); this.hydrate(); }, @@ -19,7 +19,7 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( input, target, anchor ); + insertNode(input, target, anchor); input.checked = state.foo; }, @@ -29,7 +29,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( input ); + detachNode(input); }, destroy: function() { diff --git a/test/js/samples/legacy-input-type/expected-bundle.js b/test/js/samples/legacy-input-type/expected-bundle.js index 0802e2aec6..dcb2035c99 100644 --- a/test/js/samples/legacy-input-type/expected-bundle.js +++ b/test/js/samples/legacy-input-type/expected-bundle.js @@ -174,7 +174,7 @@ function create_main_fragment(state, component) { return { create: function() { - input = createElement( 'input' ); + input = createElement("input"); this.hydrate(); }, @@ -183,13 +183,13 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( input, target, anchor ); + insertNode(input, target, anchor); }, update: noop, unmount: function() { - detachNode( input ); + detachNode(input); }, destroy: noop diff --git a/test/js/samples/legacy-input-type/expected.js b/test/js/samples/legacy-input-type/expected.js index ec867f2375..bfdde4e851 100644 --- a/test/js/samples/legacy-input-type/expected.js +++ b/test/js/samples/legacy-input-type/expected.js @@ -5,7 +5,7 @@ function create_main_fragment(state, component) { return { create: function() { - input = createElement( 'input' ); + input = createElement("input"); this.hydrate(); }, @@ -14,13 +14,13 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( input, target, anchor ); + insertNode(input, target, anchor); }, update: noop, unmount: function() { - detachNode( input ); + detachNode(input); }, destroy: 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 9a256e4997..7fe227ad5d 100644 --- a/test/js/samples/use-elements-as-anchors/expected-bundle.js +++ b/test/js/samples/use-elements-as-anchors/expected-bundle.js @@ -190,17 +190,17 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); + div = createElement("div"); if (if_block) if_block.create(); text = createText("\n\n\t"); - p = createElement( 'p' ); + p = createElement("p"); text_1 = createText("this can be used as an anchor"); text_2 = createText("\n\n\t"); if (if_block_1) if_block_1.create(); text_3 = createText("\n\n\t"); if (if_block_2) if_block_2.create(); text_4 = createText("\n\n\t"); - p_1 = createElement( 'p' ); + p_1 = createElement("p"); text_5 = createText("so can this"); text_6 = createText("\n\n\t"); if (if_block_3) if_block_3.create(); @@ -210,17 +210,17 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); + insertNode(div, target, anchor); if (if_block) if_block.mount(div, null); appendNode(text, div); - appendNode( p, div ); + appendNode(p, div); appendNode(text_1, p); appendNode(text_2, div); if (if_block_1) if_block_1.mount(div, null); appendNode(text_3, div); if (if_block_2) if_block_2.mount(div, null); appendNode(text_4, div); - appendNode( p_1, div ); + appendNode(p_1, div); appendNode(text_5, p_1); appendNode(text_6, div); if (if_block_3) if_block_3.mount(div, null); @@ -292,7 +292,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( div ); + detachNode(div); if (if_block) if_block.unmount(); if (if_block_1) if_block_1.unmount(); if (if_block_2) if_block_2.unmount(); @@ -317,17 +317,17 @@ function create_if_block(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("a"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop @@ -339,17 +339,17 @@ function create_if_block_1(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("b"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop @@ -361,17 +361,17 @@ function create_if_block_2(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("c"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop @@ -383,17 +383,17 @@ function create_if_block_3(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("d"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop @@ -405,17 +405,17 @@ function create_if_block_4(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("e"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop diff --git a/test/js/samples/use-elements-as-anchors/expected.js b/test/js/samples/use-elements-as-anchors/expected.js index c9dfd69c32..8f9a061617 100644 --- a/test/js/samples/use-elements-as-anchors/expected.js +++ b/test/js/samples/use-elements-as-anchors/expected.js @@ -15,17 +15,17 @@ function create_main_fragment(state, component) { return { create: function() { - div = createElement( 'div' ); + div = createElement("div"); if (if_block) if_block.create(); text = createText("\n\n\t"); - p = createElement( 'p' ); + p = createElement("p"); text_1 = createText("this can be used as an anchor"); text_2 = createText("\n\n\t"); if (if_block_1) if_block_1.create(); text_3 = createText("\n\n\t"); if (if_block_2) if_block_2.create(); text_4 = createText("\n\n\t"); - p_1 = createElement( 'p' ); + p_1 = createElement("p"); text_5 = createText("so can this"); text_6 = createText("\n\n\t"); if (if_block_3) if_block_3.create(); @@ -35,17 +35,17 @@ function create_main_fragment(state, component) { }, mount: function(target, anchor) { - insertNode( div, target, anchor ); + insertNode(div, target, anchor); if (if_block) if_block.mount(div, null); appendNode(text, div); - appendNode( p, div ); + appendNode(p, div); appendNode(text_1, p); appendNode(text_2, div); if (if_block_1) if_block_1.mount(div, null); appendNode(text_3, div); if (if_block_2) if_block_2.mount(div, null); appendNode(text_4, div); - appendNode( p_1, div ); + appendNode(p_1, div); appendNode(text_5, p_1); appendNode(text_6, div); if (if_block_3) if_block_3.mount(div, null); @@ -117,7 +117,7 @@ function create_main_fragment(state, component) { }, unmount: function() { - detachNode( div ); + detachNode(div); if (if_block) if_block.unmount(); if (if_block_1) if_block_1.unmount(); if (if_block_2) if_block_2.unmount(); @@ -142,17 +142,17 @@ function create_if_block(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("a"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop @@ -164,17 +164,17 @@ function create_if_block_1(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("b"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop @@ -186,17 +186,17 @@ function create_if_block_2(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("c"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop @@ -208,17 +208,17 @@ function create_if_block_3(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("d"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop @@ -230,17 +230,17 @@ function create_if_block_4(state, component) { return { create: function() { - p = createElement( 'p' ); + p = createElement("p"); text = createText("e"); }, mount: function(target, anchor) { - insertNode( p, target, anchor ); + insertNode(p, target, anchor); appendNode(text, p); }, unmount: function() { - detachNode( p ); + detachNode(p); }, destroy: noop From 5850edb0781c3dcb5b8099b56d4657e8db6b286e Mon Sep 17 00:00:00 2001 From: Andrew Shu Date: Sun, 3 Sep 2017 22:10:45 -0700 Subject: [PATCH 2/2] fix regression with css refs --- src/generators/dom/visitors/Element/Element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generators/dom/visitors/Element/Element.ts b/src/generators/dom/visitors/Element/Element.ts index f26c3e341b..2355f0e300 100644 --- a/src/generators/dom/visitors/Element/Element.ts +++ b/src/generators/dom/visitors/Element/Element.ts @@ -102,7 +102,7 @@ export default function visitElement( if (node._cssRefAttribute) { block.builders.hydrate.addLine( - `@setAttribute(${name}, "svelte-ref-${node._cssRefAttribute}", ");` + `@setAttribute(${name}, "svelte-ref-${node._cssRefAttribute}", "");` ) } }