Ok after digging around for hours regarding something within the
javascript part of the specification I want to discuss things.
Following problem:
we have within the limits of the specification following things:
javax.faces.ViewRoot should replace an entire content tree
javax.faces.Head should replace the head
javax.faces.Body should replace the body
how this is done is thankfully up to the implementation.
so far for the ViewRoot case we used document.documentElement.innerHTML
= "markup"
problem with this approach is simply it does not work out satisfying, in
fact it only works on mozilla sufficiently. Webkit is very nitpicky
regarding several things.
Here is the problem.
do it with <head><meta ...> and it will fail
do it with <body> and it will fail
generally
document.documentElement.innerHTML = "<head></head><body
style='font-weight: bold; font-size: 20px;'>aaa   </body>";
will result in following document on webkits side:
<html ...>
aaa
</html>
The head and body tags dissapear.
Further investigations revealed.
Generally Webkit under xhtml and transitional does not allow to replace
the head contents, it neither does allow to replace the body tag, only
the body contents can be replaced and should be via range and
createContextualFragment mechanisms,
also etc... is not allowed anymore (seems like an enforced strict
here)
innerHTML is alos mostly forbidden or it should not be used anymore and
it definitely fails at the datatype xhtml+xml (which is supposed to work
that way according to the spec)
Anyway what does this mean, we cannot support head replacement and full
body replacement on some browsers unless someone knows a workaround to
all this. All we can do is safely support what the browsers allow or go
for the least common denominator which is replace the body tags
contents! No matter what comes in!
I have yet to test all this on IE but I assme we run here into similar
problems!