Closed StreakInTheSky closed 4 years ago
Maybe it is just because this is an html parser
, for example, I use this library just to parse the html string into nodes and do fewer simple operation on them.this is enough for me, maybe not for you.
It will slow down the speed when users want do more operation on nodes, and it is not necessary to do that and, as you know, it is not complex to add this method, but I'd prefer insertAdjacentHTML
, not appendChild
. what do you think?
There's no documented way to make new Nodes to append into the tree. The problem is that
appendChild
only takes nodes and not raw strings. I was able to make new Nodes by importing theHTMLElement
class and using that to create elements.Is this intentionally left out or not an intended use case? It's already built in to the code, just needs an easier interface.
set_content
is able to handle strings and nodes, why not allowappendChild
to do the same?