Subscribe on changes!

Why does the list child node contain #text

avatar
Jan 19th 2021

Version

3.0.5

Reproduction link

https://codesandbox.io/s/wild-brook-pc433?file=/src/App.vue

Steps to reproduce

<span ref="eval"> { [<span>a</span>,<span>b</span>] } </span>

output : this.$refs.eval.$el.childNodes

What is expected?

NodeList(2)[span,span]

What is actually happening?

NodeList(4)[text,span,span,text]

Other

It's only in the loop

avatar
Jan 19th 2021

$el returns a plain DOM element. What you see has nothing to do with Vue. The issue tracker is also not meant for posting questions about things that are unclear to you. it's for bugs.

Feel free to ask about Javascript and how the DOM works in an appropriate channel on chat.vuejs.org