Skip to content

how to add property on TextNode #220

Closed Answered by wooorm
wqcstrong asked this question in Q&A
Discussion options

You must be logged in to vote

You can’t add properties to text nodes. That’s the thing with text nodes: they are text.
In HTML, elements have properties. You can add properties to elements.

I don’t know what you want to do. The HTML lang attribute can be set to a BCP 47 language code. 🚀 is not a language code. en is a language code.
But regardless, lang is nonsensical on script or style.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by wqcstrong
Comment options

You must be logged in to vote
2 replies
@wooorm
Comment options

@wqcstrong
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants