You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realize that the documentation around custom elements in v3 isn't complete, but I've been poking around the code and I'm not sure I can see a way to do what I was expecting.
Basically, I'd like to use the dispatch method returned from createEventDispatcher() to send native DOM events (element.dispatchEvent) when in a custom element situation. I'd be fine if it was something that required an option be sent to createEventDispatcher. I could probably do something with Actions or bind:this, but that feels awkward.
Essentially I would like my compiled custom element to be used in a context where it doesn't know it is coming from Svelte and therefore will be using standard DOM interaction. This doesn't feel like an unusual situation.
Uh oh!
There was an error while loading. Please reload this page.
Svelte v3.1.0
Firefox Developer Edition 67
I realize that the documentation around custom elements in v3 isn't complete, but I've been poking around the code and I'm not sure I can see a way to do what I was expecting.
Basically, I'd like to use the dispatch method returned from
createEventDispatcher()
to send native DOM events (element.dispatchEvent
) when in a custom element situation. I'd be fine if it was something that required an option be sent tocreateEventDispatcher
. I could probably do something with Actions orbind:this
, but that feels awkward.Essentially I would like my compiled custom element to be used in a context where it doesn't know it is coming from Svelte and therefore will be using standard DOM interaction. This doesn't feel like an unusual situation.
I've created a gist that contains all of the relevant files. If this isn't sufficient, let me know.
https://gist.github.com/colinbate/3f56197c41b2b0fc3f4e700cf7121528
The text was updated successfully, but these errors were encountered: