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
I would expect a way to hydrate on:error when it's part of <video><picture><source> elements, those seems to be run by the browser much earlier than svelte could inject listening events to it.
I need to use it as a fallback. I'm using a transparent animated video using webm/VP9, but Safari doesn't support it, so I'm going to make it fallback to animated images.
The workaround I found is to just manually add all JS to the onerror tag:
The text was updated successfully, but these errors were encountered:
imsys
changed the title
on:error needs to be hidrated when it's part of <video><source>
Expecting a way to hydrate on:error when it's part of <video><source>Feb 11, 2022
I don't think adjust the behavior of on:error in specific cases so that it's doing something other than attaching an event handler at the time of hydration is the right way forward here. I would suggest a custom use: action that, upon initialization, checks whether the element has already settled (successfully or unsuccessfully) and attaches an event handler if it has not - and reports the status with a callback either way. This could exist in userland - I don't know whether there is a nice way that works across multiple kinds of elements that would make sense to provide as a utility in Svelte itself or in Kit. I think there is an issue somewhere on the Svelte repo about providing some built-in actions.
Describe the bug
I would expect a way to hydrate
on:error
when it's part of<video><picture><source>
elements, those seems to be run by the browser much earlier than svelte could inject listening events to it.I need to use it as a fallback. I'm using a transparent animated video using webm/VP9, but Safari doesn't support it, so I'm going to make it fallback to animated images.
The workaround I found is to just manually add all JS to the onerror tag:
onerror
at<video>
elements is specified at: https://html.spec.whatwg.org/multipage/embedded-content.html#the-source-elementI think this is similar or related to #1390
Reproduction
https://github.com/imsys/sveltekit-onerror-test
Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: