Skip to content

SVGLoad doesnt dispatch #10843

@digitalkaoz

Description

@digitalkaoz

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions