Implements ResizeObserver bindings: #5524 (comment)
Continuation of: #5963
Related to #7583
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
fixes #6752
---------
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Tan Li Hau <tanhauhau@users.noreply.github.com>
* Localize the examples dependents
* Localize FAQ
* Try to fix examples API
* Remove examples api
* Prerender, use vercel adapter, disable PUT action for now
* Don't call get_examples_data on top
* Move repl PUT to its own routew
* Don't prerender REPL page
* Change console warn
* Prerender tutorial the smart way
* Use getContext in root
* work around some weird content encoding glitch
* Try the pre-generate route
* Apply the suggestions
* Fix embed examples
* Remove comment
* remove commented-out code
* Update sites/svelte.dev/src/routes/_components/Demo.svelte
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
* remove unused code
* add note to self, remove ts-ignore
* move adapter-vercel to devDependencies
* remove some unused deps
* huh we need flexsearch after all? weird
* we need sourcemap-codec as well — what the hell. are these deps missing from a dep?
---------
Co-authored-by: Rich Harris <git@rich-harris.dev>
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Microdata are a strange set of attributes which are ONLY defined in markup, and have no relationship to the underlying Document Object Model node. As such programmatically defining an element and setting a property on it with a given Microdata attribute will not work:
https://codepen.io/iambrosius/full/jOvXBBG
One can read more about microdata here: https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata
The fix is to remove itemscope being a boolean attribute, because that opts into a transformation as a DOM property, which is wrong.
Fixes #8417
The issue is that unpack_destructuring in each blocks, await blocks, and @const tags were making computed_props independently. This causes computed_props_# to conflict when each blocks were used with @const tags, or await blocks and @const tags, or consecutive @const tags together. Therefore, one solution is to use component.get_unique_name to, well, make unique names and never get conflicts.
Closes #6969
As discussed there, container query support is quite useful to add to Svelte as it is now broadly available with Firefox releasing support imminently w/ FF v110 this upcoming week (~Feb 14th). Chrome has had support since ~Aug '22. The central issue is that css-tree which is a dependency for CSS AST parsing is significantly lagging behind on adding more recent features such as container query support. Ample time has been given to the maintainer to update css-tree and I do have every confidence that in time css-tree will receive a new major version with all sorts of modern CSS syntax supported including container queries. This PR provides an interim solution for what Svelte needs to support container queries now.
It is not possible to use typescript when using `target: document`
during component initialization, because target can only be of type
Element or ShadowRoot. This means that it is not possible to hydrate
the entire document when managing the <html> element as a Svelte
component.
This commit fixes this by allowing documents to be targets.
- split logic up into "is this a contenteditable element" and depending on the outcome use either .wholeText or .data to check if an update is necessary
- add to puppeteer because jsdom does not support contenteditable
- one test is skipped it because it fails right now but helps test #5018
---------
Co-authored-by: suxin2017 <1107178482@qq.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
#8167 introduced the strict version of it - until this is configurable, we should use the relaxed version instead, since many a11y docs actually advise using ul/ol etc