-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Svelte does not recognize popover types/properties inside template #10036
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
Comments
Maybe I don't understand what you're trying to say but I don't see the issue in this. You are assigning it as an attribute, how do you want it to be otherwise? |
I want |
You have got things mixed up. HTML element attributes do not work the same way as a component prop. These are separate. When you assign an attribute over a DOM element, it is assigned as an attribute. If you want to assign it as a property, you need to get the element instance on the script and assign it from there. You shouldn't mix and match between these. |
In SolidJS for example there is |
If you want to read/set a specific prop of a DOM element, you can use |
closes #10036, this also moves the HTMLDetailsElement toggle event to its interface as it was conflicting with HTMLElement popover toggle event. --------- Co-authored-by: Simon H <[email protected]>
Describe the bug
Try to use popover and observe that no types are incorrect even though typescript lib.dom.d.ts has definitions for it.
Try to add popover property and observe that its value is set as attribute instead of property.
Reproduction
Reproduction
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: