it would be easier if there was a getter/setter instead of going hack mode: finding all the TextNodes, concatenating them into a string, then deleting the entire childNodes and replacing it with a new TextNode.
element.set_content won't work as expected as the code tries to parse it as html, which is a problem if the thing being replaced is a text block (for a script tag, for example)
it would be easier if there was a getter/setter instead of going hack mode: finding all the TextNodes, concatenating them into a string, then deleting the entire childNodes and replacing it with a new TextNode.
element.set_content
won't work as expected as the code tries to parse it as html, which is a problem if the thing being replaced is a text block (for a script tag, for example)