You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(perf): use classList.toggle instead of add/remove (#8629)
`classList.toggle(..., flag)` has been a part of the DOM standard forever,
so better use it instead of possibly causing browser deopts by using dynamic attribute access.
The `!!` is required because an `undefined` flag means flipping the current state.
---------
Co-authored-by: Dominik G <[email protected]>
Co-authored-by: Ben McCann <[email protected]>
Co-authored-by: Simon H <[email protected]>
Co-authored-by: Rich Harris <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@
16
16
***breaking** Error on falsy values instead of stores passed to `derived` ([#7947](https://github.com/sveltejs/svelte/pull/7947))
17
17
***breaking** Custom store implementers now need to pass an `update` function additionally to the `set` function ([#6750](https://github.com/sveltejs/svelte/pull/6750))
18
18
***breaking** Change order in which preprocessors are applied ([#8618](https://github.com/sveltejs/svelte/pull/8618))
19
+
***breaking** The runtime now makes use of `classList.toggle(name, boolean)` which does not work in very old browsers ([#8629](https://github.com/sveltejs/svelte/pull/8629))
19
20
***breaking** apply `inert` to outroing elements ([#8627](https://github.com/sveltejs/svelte/pull/8627))
20
21
* Add a way to modify attributes for script/style preprocessors ([#8618](https://github.com/sveltejs/svelte/pull/8618))
21
22
* Improve hydration speed by adding `data-svelte-h` attribute to detect unchanged HTML elements ([#7426](https://github.com/sveltejs/svelte/pull/7426))
0 commit comments