Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not apply. Invalid PR. #7738

Closed
wants to merge 6,659 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
6659 commits
Select commit Hold shift + click to select a range
856018a
update changelog
Conduitry Nov 19, 2021
82cb854
-> v3.44.2
Conduitry Nov 19, 2021
f35f97d
[docs] fix link to Svelte Society community-maintained tools (#6957)
grandslammer Nov 23, 2021
b1e684b
[docs] clarified definition of "local transition" in tutorial (#6895)
mjvandermeulen Nov 26, 2021
b8968f2
[docs] Use a simpler demo for the first actions tutorial (#5014) (#6962)
gtm-nayan Nov 30, 2021
13d46e3
[docs] A reference of the field variable is missing in the sidebar (#…
fcalderan Nov 30, 2021
05a8700
[docs] "What's new in Svelte" December newsletter (#6965)
DreaminDani Dec 1, 2021
4561b43
[docs] fix chat link (#6976)
Conduitry Dec 1, 2021
e352c6f
[site] only show 20 avatars instead of current massive wall (#6974)
benmccann Dec 1, 2021
c79d851
[chore] Make changing the name of a REPL obvious (#6808)
baseballyama Dec 2, 2021
4594d04
[site] REPL dirty tracking (#6153)
joshnuss Dec 2, 2021
761e9ec
[fix] allow site to run again after marked upgrade (#6982)
benmccann Dec 2, 2021
8ba24f8
fix: use correct yaml syntax in blog posts (#6984)
pngwn Dec 3, 2021
f90545d
[docs] simplify template literals to string primitives (#6806)
dleicht Dec 6, 2021
d8764d7
[docs] Clarify that VS Code isn't the only supported IDE (#6989)
dmwyatt Dec 10, 2021
58b5c19
[fix] bind:this during onMount in manually-created component (#6920)
rmunn Dec 13, 2021
03794ee
update changelog
Conduitry Dec 13, 2021
4715582
[feat] opt-out loopGuard for async loops (#6963)
tanhauhau Dec 13, 2021
c7300c9
update changelog
Conduitry Dec 13, 2021
265e4de
[fix] prevent cursor jump for all text inputs (#6941)
skippednote Dec 13, 2021
e61704e
update changelog
Conduitry Dec 13, 2021
e3480ac
-> v3.44.3
Conduitry Dec 13, 2021
26cb687
update changelog
Conduitry Dec 13, 2021
9db2438
Remove site - new home at sveltejs/sites (#6994)
benmccann Dec 14, 2021
72ec8c6
[docs] fix hash fragments (#7025)
Rich-Harris Dec 17, 2021
1b1948a
[docs] fix path to /tutorial/image.gif (#7033)
Conduitry Dec 21, 2021
6fa6af1
[docs] absolute and future proof links (#7038)
ignatiusmb Dec 21, 2021
c129df8
[docs] absolute assets links (#7049)
ignatiusmb Dec 24, 2021
0a71dfa
[chore] adjust stale bot actions per run
dummdidumm Dec 24, 2021
0122ff8
[docs] absolute sibling links (#7051)
ignatiusmb Dec 25, 2021
de7aa82
[docs] Updated link to the ease visualizer in the docs (#7054)
tylerlwsmith Dec 27, 2021
eb7af30
[docs] use proper symbol for Celsius and Fahrenheit (#7061)
espinielli Dec 27, 2021
62a11a8
[docs] fix typo in Context API tutorial (#7063)
Charca Dec 28, 2021
8e027e0
[docs] mention tweened duration as function
ignatiusmb Dec 28, 2021
51d7c9b
[chore] delete stale bot yaml config
dummdidumm Dec 30, 2021
afae0dc
[docs] "What's new in Svelte" January newsletter (#7074)
DreaminDani Jan 1, 2022
604c755
Update license year (#7091)
ceifa Jan 2, 2022
5a313ba
[feat] add a11y-no-redundant-roles check (#7067)
Jan 3, 2022
704a8cd
update changelog
dummdidumm Jan 3, 2022
20d0f26
[docs] force externalize chatroom link (#7097)
hyp3rflow Jan 4, 2022
deb4dc5
[docs] update links to Blender Studio (#7098)
walela Jan 4, 2022
eadfef1
[fix] foreign namespace hash link (#7080)
ignatiusmb Jan 4, 2022
befcbf5
[chore] fix test flakiness (#7076)
baseballyama Jan 5, 2022
08ade9b
[fix] ensure truthy non-boolean attributes are rendered correctly in …
pngwn Jan 6, 2022
7dcbfd8
[fix] {:else if} value incorrectly cached (#7043)
tanhauhau Jan 6, 2022
fd901c4
update changelog
Conduitry Jan 6, 2022
27e6669
[fix] code generation with arrow functions and object destructuring a…
Conduitry Jan 6, 2022
6ecd954
[fix] binding member expression should only invalidate the object, no…
tanhauhau Jan 6, 2022
d6204e5
update changelog
Conduitry Jan 6, 2022
82061d5
[feat] add reference for default values in destructuring context (#7007)
tanhauhau Jan 6, 2022
0e9081e
update changelog
Conduitry Jan 6, 2022
9587001
-> v3.45.0
Conduitry Jan 6, 2022
186d10f
[feat] Style directives (#5923)
plmrry Jan 8, 2022
919ad7e
[docs] add note about the AST not being public API (#7113)
dummdidumm Jan 9, 2022
b91aece
[fix] hydrate correct elements when using `@html` (#6946)
baseballyama Jan 9, 2022
3866fc5
update changelog
benmccann Jan 9, 2022
d146c79
[fix] ensure style manager instances don't conflict with each other (…
ivanhofer Jan 11, 2022
a4a00a5
update changelog
benmccann Jan 11, 2022
9e5b078
[feat] implement constants in markup (#6413)
tanhauhau Jan 11, 2022
015b08f
update changelog
Conduitry Jan 11, 2022
62ae704
-> v3.46.0
Conduitry Jan 11, 2022
a7131c2
[fix] handle kebab case style directives (#7123)
ghostdevv Jan 12, 2022
2eec5d9
update changelog
dummdidumm Jan 12, 2022
7baeb56
[fix] adjust style directive AST (#7127)
dummdidumm Jan 12, 2022
0ba7a80
update changelog
Conduitry Jan 12, 2022
20b4cb8
-> v3.46.1
Conduitry Jan 12, 2022
d69b591
fix changelog typo
Conduitry Jan 12, 2022
59a085d
[blog] Accelerating Svelte's Development (#7118)
benmccann Jan 14, 2022
aa97f0c
[blog] remove heading to align with other blog posts
benmccann Jan 14, 2022
233dfc3
[docs] explain initial value for bind scroll (#7065)
bluwy Jan 14, 2022
38abc2f
[fix] export FlipParams interface from "svelte/animate" (#7104)
metonym Jan 14, 2022
f3f8c23
update changelog
dummdidumm Jan 14, 2022
70efc54
[blog] fix Netlify link (#7138)
geoffrich Jan 14, 2022
ebb8596
fix: test cases should fail when it should fail (#7139)
tanhauhau Jan 14, 2022
f7e39da
fix: style directive not reactive in {#each} loop (#7140)
tanhauhau Jan 14, 2022
daa9c57
update changelog
Conduitry Jan 14, 2022
8e32a65
[blog] update sirens (#7142)
ghostdevv Jan 14, 2022
6f15f78
-> v3.46.2
Conduitry Jan 14, 2022
26e7407
Handle whitespace inside #each with animation (#5477)
ehrencrona Jan 15, 2022
d7d4085
[docs] Use symbols for context keys in tutorial (#7046)
xamir82 Jan 16, 2022
341cdcd
[blog] fix rss feed link
ignatiusmb Jan 24, 2022
0b6c2c6
Create CODE_OF_CONDUCT.md (#7183)
pngwn Jan 25, 2022
beb13b5
[fix] fix crash when using arrow functions in {@const} (#7144)
baseballyama Jan 26, 2022
1d4ad97
update changelog
Conduitry Jan 26, 2022
09e4030
[fix] raise compile error if variable name is same as imported variab…
baseballyama Jan 26, 2022
c8ff800
update changelog
Conduitry Jan 26, 2022
1a7297c
-> v3.46.3
Conduitry Jan 26, 2022
a5c6f7a
[docs] fix #each in window-bindings example (#7181)
kootstra-rene Jan 26, 2022
bebed92
[chore] remove codecov material (#7190)
Conduitry Jan 26, 2022
4a14942
[docs] Rename a variable `count_value` to `countValue` in the `Stores…
nazar-lazarchuk Jan 27, 2022
bd697cb
[docs] add docs for a11y-no-redundant-roles (#7195)
geoffrich Jan 27, 2022
ab71ffd
[fix] prevent maximum call stack size exceeded error on large pages (…
dummdidumm Jan 31, 2022
8df84cc
[docs] fix broken links (#7194)
geoffrich Feb 1, 2022
4c3a3d7
[fix] type Ast css/instance/module properties as optional (#7204)
metonym Feb 2, 2022
c80f09d
[fix] add `FormData` as a known global (#7199)
ignatiusmb Feb 2, 2022
a7def89
[feat] Better error message for inline component style directive (#7187)
efeskucuk Feb 2, 2022
58d925c
[fix]: keep space in `<pre>` or when `preserveWhitespace: true` (#6990)
ota-meshi Feb 2, 2022
7bb909c
update changelog
dummdidumm Feb 2, 2022
e1cd191
[docs] "What's new in Svelte" February newsletter (#7202)
DreaminDani Feb 2, 2022
b2fd837
[blog] fix link formatting
ignatiusmb Feb 2, 2022
fe03681
-> v3.46.4
Conduitry Feb 3, 2022
cd07f30
[docs] set language on FAQ code blocks (#7237)
geoffrich Feb 9, 2022
f1e845d
Bump ajv from 6.10.2 to 6.12.6 (#7248)
dependabot[bot] Feb 13, 2022
0e5b83d
[docs] update to multi-page docs links (#7249)
ignatiusmb Feb 14, 2022
a999b41
Bump path-parse from 1.0.6 to 1.0.7 (#7258)
dependabot[bot] Feb 14, 2022
23fd2bb
[doc] fixed seemingly erroneous capitalization of noun (#7273)
mahmoud-moursy Feb 17, 2022
ef51d7a
[docs] improve actions tutorial presentation (#7283)
opensas Feb 17, 2022
e47b2c3
[docs] Fix feature request link (#7292)
kram1138 Feb 19, 2022
492597e
[fix] add aria-description aria_attributes - (#7302)
stordahl Feb 22, 2022
280150d
[docs] Add missing parent element to code example. (#7309)
whymog Feb 25, 2022
ab88f95
[feat] TS interfaces for typing actions (#7121)
ignatiusmb Feb 26, 2022
40bf2a0
update changelog
dummdidumm Feb 26, 2022
dc29b80
[docs] fix typo (#7323)
sudongyuer Feb 28, 2022
bbcb06c
[docs] "What's new in Svelte" March newsletter (#7293)
DreaminDani Mar 1, 2022
5cebcde
[docs] add `-` to the beginning of the line (#7328)
tomoam Mar 2, 2022
9cda6cd
fix: do not generate unused-export-let inside <script context="module…
rgossiaux Mar 3, 2022
f9beab0
Update CHANGELOG.md
benmccann Mar 3, 2022
408c4ec
[fix] do not collapse whitespace-only css vars (#7303)
geoffrich Mar 3, 2022
26dac4a
Update changelog
dummdidumm Mar 3, 2022
ae3926e
[fix] attribute escaping during ssr (#7333)
mrkishi Mar 3, 2022
2898563
Update changelog
dummdidumm Mar 3, 2022
3358b77
[docs] fix typo (#7344)
isabel-nielson Mar 6, 2022
5de0ad9
[docs] Correct default port on blog posts (#7372)
raul-saez Mar 17, 2022
9727d1a
[docs] Update package.json to link to homepage (#7374)
UltiRequiem Mar 21, 2022
11c91cc
[fix] style: directive should prevent innerHTML optimization (#7390)
tivac Mar 30, 2022
33d0510
update changelog
Conduitry Mar 30, 2022
4f1f762
-> v3.46.5
Conduitry Mar 30, 2022
6c6a771
[fix] include action in pkg.files (#7407)
ghostdevv Mar 31, 2022
2725feb
-> v3.46.6
Conduitry Mar 31, 2022
ea71448
Bump ansi-regex from 3.0.0 to 3.0.1 (#7402)
dependabot[bot] Mar 31, 2022
596e412
Bump minimist from 1.2.5 to 1.2.6 (#7401)
dependabot[bot] Mar 31, 2022
034975f
[docs] "What's new in Svelte" April newsletter (#7377)
DreaminDani Apr 1, 2022
825f803
[docs] fix typos in whats-new-in-svelte-april-2022.md (#7417)
janosh Apr 4, 2022
a7ced5e
add Symbol to globals (#7419)
maxlath Apr 6, 2022
6716e59
Update CHANGELOG.md
tanhauhau Apr 6, 2022
ae651b8
[docs] Fix REPL instructions (#7413)
webchick Apr 6, 2022
c8a6c22
[docs] update bundler documentation (#7414)
benmccann Apr 8, 2022
0257067
Change top level requirement wording (#7336)
TzuHsuan Apr 8, 2022
3d9bf0d
[docs] clarify css option (#7271)
benmccann Apr 8, 2022
f50625f
[docs] add note about initially selected value
dummdidumm Apr 8, 2022
c0250a4
[docs] add link to vitest svelte example to test faq (#7281)
dominikg Apr 8, 2022
1923878
[fix] add key dependencies into block dependencies (#7422)
tanhauhau Apr 8, 2022
7480b92
Update CHANGELOG.md
tanhauhau Apr 8, 2022
e41f914
[feature] Dynamic elements implementation <svelte:element> (#6898)
baseballyama Apr 8, 2022
462d05b
update changelog
dummdidumm Apr 8, 2022
2a60909
[fix] better context checks for identifiers in const tags (#7222)
baseballyama Apr 8, 2022
ed76de0
update changelog
dummdidumm Apr 8, 2022
88d9a73
-> v3.47.0
Conduitry Apr 8, 2022
a52e3ac
[docs] add `<svelte:element>` example (#7439)
oekazuma Apr 10, 2022
73c5351
[feat] Make setContext return the value that was passed in (#7432)
gtm-nayan Apr 11, 2022
0214ded
Update CHANGELOG.md
tanhauhau Apr 11, 2022
45010c0
[docs] fix tutorial/keyed-each-blocks (#7218)
josh-brainbox Apr 11, 2022
4b3f099
fix const declared without let: binding get ignored (#7434)
tanhauhau Apr 12, 2022
6371db2
Update CHANGELOG.md
tanhauhau Apr 12, 2022
4682ad4
each animate allow having comment siblings (#7435)
tanhauhau Apr 12, 2022
76c95d4
Update CHANGELOG.md
tanhauhau Apr 12, 2022
8d1e923
execute `npm audit fix` (#7421)
tarunama Apr 12, 2022
6cfc90a
[feat] dispatch cancelable custom events (#7064)
bluwy Apr 12, 2022
bcbdb4b
[feat] improve error message for animate used in a non-keyed each blo…
henninggross Apr 12, 2022
032805c
[docs] style directive tutorial (#7161)
gtm-nayan Apr 12, 2022
8208692
[fix] correctly track dependencies of let: bindings (#7448)
tanhauhau Apr 13, 2022
8957ecb
[docs] FAQ cleanup (#7452)
benmccann Apr 14, 2022
82c9a17
[docs] fix link to webpack-loader (#7460)
benbender Apr 14, 2022
5b14cf5
[fix] strip leading newline after `<pre>` and `<textarea>` (#7280)
ota-meshi Apr 14, 2022
297bcf4
[docs] Remove draft status of setting-up-your-editor blog-entry to fi…
Jan-Koll Apr 16, 2022
f194011
[fix] Local transitions from #key blocks (#7286)
bfanger Apr 16, 2022
12af45c
Update CHANGELOG.md
tanhauhau Apr 16, 2022
fb61331
[fix] textContent should not be set for <template> element. (#7297)
lidlanca Apr 16, 2022
cec73e2
Update CHANGELOG.md
tanhauhau Apr 16, 2022
d096a4e
[docs] Improve clarity of 2 files to edit and improve learning (#7285)
thadguidry Apr 16, 2022
6b38042
[chore] fix lint (#7466)
baseballyama Apr 16, 2022
13663dd
[fix] Specify svg namespace if {@html} is used in svg (#7464)
baseballyama Apr 19, 2022
198eac6
Update CHANGELOG.md
tanhauhau Apr 19, 2022
e2676e4
[docs] add more examples on the spring store API docs (#7463)
tanhauhau Apr 20, 2022
60ac1fc
use own api to replace jsonplaceholder.typicode.com
tanhauhau Apr 20, 2022
fac0df1
use own api to replace jsonplaceholder.typicode.com (#7472)
tanhauhau Apr 20, 2022
03668b7
update api
tanhauhau Apr 20, 2022
b608428
Merge branch 'tanhauhau/gh-328'
tanhauhau Apr 20, 2022
0da9fca
[docs] fix sentences in `<svelte:element>` (#7484)
baseballyama Apr 25, 2022
240dfa9
fix package-lock.json
Conduitry Apr 30, 2022
5b56ceb
update changelog
Conduitry Apr 30, 2022
643fc80
[fix] do not be over-eager in removing unused CSS for dialog[open] (#…
leader22 Apr 30, 2022
e758c3b
update changelog
Conduitry Apr 30, 2022
58eb86c
[fix] always use `set_attributes` for attribute of `<svelte:element>`…
baseballyama Apr 30, 2022
c3f185b
update changelog
Conduitry Apr 30, 2022
7f64b4b
[feat] support const tag for if block (#7451)
tanhauhau Apr 30, 2022
553e3d5
update changelog
Conduitry Apr 30, 2022
c6ddf1c
[fix] rendering void tag for `<svelte:element>` (#7453)
baseballyama Apr 30, 2022
297e5ec
update changelog
Conduitry Apr 30, 2022
748dd6f
-> v3.48.0
Conduitry Apr 30, 2022
ef9c291
[docs] "What's new in Svelte" May newsletter (#7483)
DreaminDani May 3, 2022
69fc09c
Update introduction/dynamic-attributes (#7498)
hslee2008 May 4, 2022
b5cf02b
[chore] upgrade to eslint 8 (#7506)
benmccann May 6, 2022
38f770b
Faster SSR (#5701)
Rich-Harris May 13, 2022
c84ef59
update changelog
benmccann May 13, 2022
b8466a8
[fix] remove duplicate semicolon (#7534)
matteobaccan May 16, 2022
19451c0
[docs] clarify array methods that won't trigger reactivity (#7073)
stephanietuerk May 17, 2022
488edb0
[docs] Fix statement about the order of bind: and on: (#7357)
gtm-nayan May 18, 2022
1609ab8
fix to apply class directive for svelte:element (#7531)
baseballyama May 18, 2022
0a3af5f
Update CHANGELOG.md
tanhauhau May 18, 2022
ee50eb8
[docs] "What's new in Svelte" June newsletter (#7565)
DreaminDani May 31, 2022
f735c83
cleanup PR links in last blog post
benmccann May 31, 2022
12bc3e1
[docs] update getting started info (#7573)
Rich-Harris Jun 3, 2022
9ef3c46
[docs] fix typo in 02-template-syntax.md (#7593)
a-alexander Jun 8, 2022
06c68ff
[chore] update changelog (#7602)
baseballyama Jun 12, 2022
7f5517d
[chore] remove nyc stuff (#7601)
baseballyama Jun 12, 2022
ad26148
[fix] harden attribute escaping during ssr (#7530)
mrkishi Jun 20, 2022
07b392b
Update changelog
dummdidumm Jun 20, 2022
a295340
[docs] remove v2 -> v3 converter mention (#7597)
hmt Jun 25, 2022
28577ec
[docs] use npm create instead of npm init (#7641)
ryuheechul Jun 30, 2022
7bb2393
[feat] add convenience types ComponentType and ComponentProps (#6770)
dummdidumm Jul 1, 2022
2930683
[docs] "What's new in Svelte" July newsletter (#7637)
DreaminDani Jul 1, 2022
92fbdcb
[fix]destroy empty component (#7492)
magentaqin Jul 4, 2022
57a7b34
Update CHANGELOG.md
tanhauhau Jul 4, 2022
ab68471
[fix] support @layer (#7514)
kindoflew Jul 4, 2022
e44913d
update changelog
baseballyama Jul 4, 2022
2779f98
[fix] export CompileOptions (#7658)
dummdidumm Jul 6, 2022
443c144
update changelog
dummdidumm Jul 6, 2022
a8b77eb
-> v3.49.0
Conduitry Jul 7, 2022
6f6e6cf
[docs] fix typo (#7672)
sepehr-safari Jul 10, 2022
b0b33c4
a11y: Add role-has-required-aria-props rule (#5852)
melnary Jul 10, 2022
f9c84e9
Update CHANGELOG.md
tanhauhau Jul 10, 2022
bed2696
[feat]: Add A11y aria-proptypes check (#6978)
kwangure Jul 11, 2022
24839c3
Update CHANGELOG.md
tanhauhau Jul 11, 2022
25412a1
[feat] add a11y check on abstract roles (#6241)
anthonylegoas Jul 11, 2022
50745e2
Update CHANGELOG.md
tanhauhau Jul 11, 2022
36206b6
[docs] update intro sentence of reactive declarations tutorial (#7467)
simondao Jul 11, 2022
1e7ffa4
rename test files from svelte-slot -> svelte-fragment (#7679)
tanhauhau Jul 12, 2022
ec32c50
Link to sites repository in README.md (#7684)
stephane-vanraes Jul 14, 2022
aa59608
[docs] npm create needs @latest tag (#7687)
benmccann Jul 14, 2022
3c2d2e0
[docs] link content to site directory (#7688)
ignatiusmb Jul 15, 2022
2fb8ec2
fixed removal of empty stylesheets created from transitions (#7662)
tanhauhau Jul 17, 2022
0a3e5c6
Update CHANGELOG.md
tanhauhau Jul 17, 2022
01dd46c
[feat] check noninteractive roles on interactive elements (#5955)
anthonylegoas Jul 17, 2022
67c66f6
Update CHANGELOG.md
tanhauhau Jul 17, 2022
7fff3b4
[docs] update port in "Svelte for new developers" blog. (#7697)
Mlocik97 Jul 19, 2022
279208b
[fix] error when using combinator incorrectly (#7650)
tanhauhau Jul 19, 2022
851b3f8
Update CHANGELOG.md
tanhauhau Jul 19, 2022
932a87a
[feat] add convenience type for `ComponentEvents` (#7702)
ivanhofer Jul 25, 2022
185e0c0
update changelog
dummdidumm Jul 25, 2022
154dfd3
[chore] upgrade source-map (#7729)
bluwy Jul 27, 2022
156379d
[fix] handle arrow function on slot inside svelte:fragment (#7667)
magentaqin Jul 28, 2022
f69cef5
update changelog
dummdidumm Jul 28, 2022
75897af
Bump svelte from 3.43.0 to 3.49.0 (#7689)
dependabot[bot] Jul 28, 2022
6adf2b8
Fix hydration duplicate head tag issue sveltejs#7444
maxipaxo Jul 29, 2022
275ec32
Fix hydration duplicate head tag issue sveltejs#7444
Jul 29, 2022
bb02fae
Fix hydration duplicate head tag issue sveltejs#7444
Jul 29, 2022
0c84209
Merge branch 'master' of https://github.com/maxiruani/svelte
Jul 31, 2022
d1f22f8
Merge branch 'master' of https://github.com/maxiruani/svelte
Jul 31, 2022
30e7d9c
Merge branch 'master' of https://github.com/maxiruani/svelte
Jul 31, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/compiler/compile/render_dom/wrappers/Head.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class HeadWrapper extends Wrapper {
let nodes;
if (this.renderer.options.hydratable && this.fragment.nodes.length) {
nodes = block.get_unique_name('head_nodes');
block.chunks.claim.push(b`const ${nodes} = @query_selector_all('[data-svelte="${this.node.id}"]', @_document.head);`);
block.chunks.claim.push(b`const ${nodes} = @head_selector('${this.node.id}', @_document.head);`);
}

this.fragment.render(block, x`@_document.head` as unknown as Identifier, nodes);
Expand Down
10 changes: 8 additions & 2 deletions src/compiler/compile/render_ssr/handlers/HtmlTag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import RawMustacheTag from '../../nodes/RawMustacheTag';
import { Expression } from 'estree';

export default function(node: RawMustacheTag, renderer: Renderer, options: RenderOptions) {
if (options.hydratable) renderer.add_string('<!-- HTML_TAG_START -->');
if (options.hydratable) {
renderer.add_string(`<!-- HTML_TAG_START ${options.head_id ? `data-svelte="${options.head_id}" ` : ''}-->`);
}

renderer.add_expression(node.expression.node as Expression);
if (options.hydratable) renderer.add_string('<!-- HTML_TAG_END -->');

if (options.hydratable) {
renderer.add_string(`<!-- HTML_TAG_END ${options.head_id ? `data-svelte="${options.head_id}" ` : ''}-->`);
}
}
32 changes: 27 additions & 5 deletions src/runtime/internal/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,14 @@ export function claim_space(nodes) {
return claim_text(nodes, ' ');
}

function find_comment(nodes, text, start) {
function find_html_tag_comment(nodes, text, start) {
for (let i = start; i < nodes.length; i += 1) {
const node = nodes[i];
if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {
return i;
if (node.nodeType === 8 /* comment node */) {
const value = node.textContent.trim();
if (value === text || value.startsWith(text + ' data-svelte="') === true) {
return i;
}
}
}
return nodes.length;
Expand All @@ -490,8 +493,8 @@ function find_comment(nodes, text, start) {

export function claim_html_tag(nodes, is_svg: boolean) {
// find html opening tag
const start_index = find_comment(nodes, 'HTML_TAG_START', 0);
const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);
const start_index = find_html_tag_comment(nodes, 'HTML_TAG_START', 0);
const end_index = find_html_tag_comment(nodes, 'HTML_TAG_END', start_index);
if (start_index === end_index) {
return new HtmlTagHydration(undefined, is_svg);
}
Expand Down Expand Up @@ -640,6 +643,25 @@ export function query_selector_all(selector: string, parent: HTMLElement = docum
return Array.from(parent.querySelectorAll(selector)) as ChildNodeArray;
}

export function head_selector(nodeId: string, head: HTMLElement) {
const result = [];
let started = 0;
for (const node of head.childNodes) {
if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === `HTML_TAG_END data-svelte="${nodeId}"`) {
started -= 1;
result.push(node);
} else if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === `HTML_TAG_START data-svelte="${nodeId}"`) {
started += 1;
result.push(node);
} else if (started > 0) {
result.push(node);
} else if (node.nodeType === 1 /* element node */ && (<Element>node).getAttribute('data-svelte') === nodeId) {
result.push(node);
}
}
return result;
}

export class HtmlTag {
private is_svg = false;
// parent for creating node
Expand Down
4 changes: 4 additions & 0 deletions test/hydration/samples/head-html/Nested.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

<svelte:head>
{@html '<meta name="nested_meta" content="nested_value">'}
</svelte:head>
Empty file.
7 changes: 7 additions & 0 deletions test/hydration/samples/head-html/_after_head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- HTML_TAG_START data-svelte="svelte-p6n9ep" -->
<meta name="main_meta" content="main_value">
<!-- HTML_TAG_END data-svelte="svelte-p6n9ep" -->

<!-- HTML_TAG_START data-svelte="svelte-1ygcsvx" -->
<meta name="nested_meta" content="nested_value">
<!-- HTML_TAG_END data-svelte="svelte-1ygcsvx" -->
Empty file.
7 changes: 7 additions & 0 deletions test/hydration/samples/head-html/_before_head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- HTML_TAG_START data-svelte="svelte-p6n9ep" -->
<meta name="main_meta" content="main_value">
<!-- HTML_TAG_END data-svelte="svelte-p6n9ep" -->

<!-- HTML_TAG_START data-svelte="svelte-1ygcsvx" -->
<meta name="nested_meta" content="nested_value">
<!-- HTML_TAG_END data-svelte="svelte-1ygcsvx" -->
9 changes: 9 additions & 0 deletions test/hydration/samples/head-html/main.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script>
import Nested from './Nested.svelte';
</script>

<svelte:head>
{@html '<meta name="main_meta" content="main_value">'}
</svelte:head>

<Nested/>