I'm looking to create a custom event in HTML, JS.
<input type="text" oncustombind="foo(event);" />
How can I create one such? 'oncustombind' is the custom event I want to create. I should be able to call the function/code defined in the oncustombind attribute. Also, I need to pass some data to the event object.
I don't want to use any libraries such as jquery, YUI.
Any help would be deeply appreciated.
this
context of the web component with the chidlren dom element usingObject.assign
. In this way any selected Dom element can have access to methods defined in the web components class. It would be even nicer to have access to custom events from inline custom event handlers. – Berlin