Comments (5)
Technically, an event with whatever name can be dispatched on any element, so any on*
handler must be allowed.
I see your point, and likely it could be more useful as an eslint rule.
from svelte.
My suggestion would be to catch it in the typings. I know most attributes are case insensitive. But these events are used by svelte and do not work with any casing
from svelte.
This is handled by typings already. Furthermore we can't know what custom events with weird typing someone might listen to. Enhancing the types for that in user land is a known pattern, if this was a warning inside the compiler we would need more options to silence it. Therefore closing
from svelte.
The casing is not handling by typings. Right now any casing is valid to the types but only full lowercase is valid to svelte. It seems like svelte should either work with any case or warn on invalid casing.
from svelte.
Oh right, language tools lowercases them - we need to stop doing that for event attributes in Svelte 5. Opened sveltejs/language-tools#2345 for that
from svelte.
Related Issues (20)
- Default values for array-like props breaks rendering HOT 1
- Svelte 5: broken reactivity in legacy mode in rare case HOT 1
- Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json] HOT 2
- Svelte 5: Binding `scrollY` to `svelte:window` does not update the initial value
- Svelte 5: `contenteditable="true"` with `bind:innerText` breaks the output of `{@render children()}` HOT 5
- Allow `textContent` / `innerHTML` / `innerText` binding without setting the `contenteditable` attribute HOT 4
- Transitions break when wrapped in component. HOT 2
- A slash in a style class breaks the class directive HOT 1
- svelte-ignore regression on Svelte 5 HOT 5
- ReferenceError: Request is not defined on launch HOT 1
- Svelte 5: add examples of mixing runes and store to documention HOT 4
- In class syntax, you cannot create non-reactive variables. HOT 3
- docs: svelte 5 event handler pass variables? HOT 2
- Svelte 5: Tell if a bindable prop is actually passed using bind HOT 8
- Bad error message on `svelte:window`
- Spread props with functions wonβt work HOT 1
- Update being skipped in slot HOT 2
- VS Code: The Svelte server crashed 5 times. Cannot find module @rollup/rollup-win32-x64-msvc HOT 8
- Svelte 5: ReactiveMap and ReactiveSet has no values in console (only firefox)
- SVGs with animateTransform lag for an extremely long time when embedded HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte.