Werner Punz schrieb:
Curtiss Howard schrieb:
Forgive me if I'm missing some important details, but why even use
innerHTML in the first place? It should be possible to parse the
incoming text into a DOM node (there's some JS function for it, I
can't remember which), then import that node as a sibling of the
<body> element (for example) and delete the first <body> element.
Wouldn't that work?
It was one of my testcases to do that since I shun innerHTML (we dont do
it anyway normally)
Does not work either on safari...
You can do dom manipulation on the contents of the body element but you
cannot delete the body element in most browsers under xhtml conditions
as it seems!
Ok it seems I overlooked something as it seems it is possible to replace
the body element, after all, which means I only have to parse that one
and replace it in case of getting a viewRoot.
The problem still persists that we cannot properly deal with the head.
As it seems we have to change our code simply to replace only the body
in any case...
Werner