When adding new elements with pyx-id the event won't fire because the addEventListener is only called once after the document is loaded.
We should be able to attach event for components coming from the websocket api.
I'm thinking one of 2 ways:
Using MutationObserver to check for changes in the DOM, might cause performace issues though.
Adding check when getting a new component and adding the necessary events if the pyx-id attribute is presented.
When adding new elements with
pyx-id
the event won't fire because theaddEventListener
is only called once after the document is loaded. We should be able to attach event for components coming from the websocket api.I'm thinking one of 2 ways:
pyx-id
attribute is presented.