Just a quick exemple on how to pass a DOM elements into properties of a VueJS component (because I couldn't find that info anywhere apparently !) :
export default {
props: {
myDomSelectorOrElement : {
type: [String, Element],
default: null
},
},
data() {
return {
}
}
}
I thought the proper type would have been object
because a typeof someDomElement
outputs object
. But for some reasons the type Element
seems to work !