-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
Description
Important
This is a bug for Remix.v3
Code
import {dom} from "@remix-run/events";
import {hydrated, type Remix} from "@remix-run/dom";
export const Sample = hydrated(
routes.assets.href({path: 'demo.js#Sample'}),
function (this: Remix.Handle) {
return () => {
return (
<svg on={dom.load((event) => {
svgEl = event.currentTarget
console.log(svgEl);
this.update();
})>
</svg>
)
}
}
)it works properly with binding click. Even when i do this:
<svg onload="alert(1)"></svg>it works. So Svg Element doesnt seem to dispatch the load event properly.
https://developer.mozilla.org/en-US/docs/Web/API/SVGElement/load_event