Skip to content
Advertisement

Active events in vue instance encapsulated inside shadowDOM

I’m searching to trigger event from a vue instance which is encapsulated inside a shadowDOM.

For the moment, my code create a new Vue instance inside a shadowDOM and print the template without the style (because nuxt load the style inside the base vue instance).

I can call methods of each instance

But, when i’m trying to add an event / listener on my component, it doesn’t work.

DOM.vue

JavaScript

bloc.vue

JavaScript

Any idea ?

Thank you

Advertisement

Answer

bloc @click.native=’listenClick’/>

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement