Re: [WICG/webcomponents] CustomEvents Add Event Handler in Html (#908)

@MichaelPeter please note that the `@` syntax is only available in lit-html templates, and not in plain HTML. It also takes a JS reference the the event listener function, not the source text. So this won't work out-of-the-box with Blazor.

It is possible to implement an onxxx event handler property/attribute which will convert a `javascript:`-prefixed string into a function, which is what @domenic is referring to.

It's a bit tricky to get such a property to behave exactly like the built-in event handler properties in the platform, but it's mostly doable. It's also a source of potential security issues, especially if you don't name the property with an "on" prefix so sanitizers can remove them.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/908#issuecomment-727057182

Received on Friday, 13 November 2020 22:01:11 UTC