Subscribe on changes!

A custom element defined with definecustomelement cannot call its internally defined method when it is used externally

avatar
Jun 24th 2022

Vue version

3.2.37

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-izmuu4?file=src%2FApp.vue,src%2Fcustom.js,vite.config.js,src%2FButton.ce.vue,src%2Fmain.js&terminal=dev

Steps to reproduce

custom.js defines a custom element When used in app.vue, the method log defined in cannot be called

What is expected?

the method log defined in can be called

What is actually happening?

the method log defined in cannot be called

System Info

No response

Any additional comments?

No response

avatar
Jun 24th 2022

This is not a bug, it's simply not supported (and nothing in our docs say it would be)

This could be made possible if we decide to work a feature for #5540