Creating a textNode, but using character entity references

105 Views Asked by At

I tried creating a text node with character entity references. (In JavaScript) I was not successful. Question: How would I create a text node with special characters?

1

There are 1 best solutions below

0
Simon On BEST ANSWER

You should use the unicode value notation: document.createTextNode("\uf012");