custom-elements-everywhere
custom-elements-everywhere copied to clipboard
Add test to emit custom event
I'm currently encountering a problem with svelte and I think it could be interesting to know if other framework has this caveat.
The goal of the test is to see if a custom element produced by a framework can emit a CustomEvent.
<my-element></my-element>
<script>
document.querySelector('my-element').addEventListener('myevent', function (e) {
});
</script>
The sentence would be
- The library/framework should be able to dispatch DOM events from a custom element. These DOM events could be listened from the outside.
This is a good test to add if we add a suite for the ability to produce a web component with each library