i have following code:
const x = document.createTextNode('Helloooo')
document.body.insertAdjacentText('beforebegin', x)
and after execution i see something like [object Text].
My question is how do I see the clear text, thus "Helloooo"?
According the documentation:
- insertAdjacentText (text nodes)
- insertAdjacentElement (nodes)
- insertAdjacentHTML (html string)
What does document.createTextNode return? I thought a text node, so I use first method, second doesnt works.
Thx for help.