Re:Why Not Document.write()?
by zffr on Saturday April 01, 2023 @06:42PM
(#35404905)
You can use JS to set `display: none` on the relevant HTML elements
[ Parent
| on HN ]
Re:Why Not Document.write()?
by johannes1234321 on Saturday April 01, 2023 @06:53PM
(#35404996)
The elements then still appear in the DOM and may be affected by DOM manipulation etc.
Re:Why Not Document.write()?
by arcanemachiner on Saturday April 01, 2023 @07:37PM
(#35405358)
How about slapping the outerHTML into a <template> tag?
Disclaimer: I didn't read the article and am just bikeshedding.
Re:Why Not Document.write()?
by lifthrasiir on Saturday April 01, 2023 @09:43PM
(#35406237)
So do comments: you can get them via `Node.childNodes` (but not via `Element.children` which only returns elements).