liorean wrote:
For my purposes, if the application is processing element content, it
needs to raise an error if non-whitespace text is found. If it is
processing mixed content, it needs to pass the skipped content back to
the caller. I cannot think of the case where non-whitespace text
should ever be silently ignored.
I can see many uses. Script tree transformations, overlays, most
client side manipulation, if you want to write your own Selectors API
for kicks, there are many cases where you are only interested in the
elements tree.
I don't think implementing things "for kicks" is a useful use case. In
general adding spec features to allow other specs to build on top of
that is a bad idea IMHO, I basically never use other public APIs when
implementing features, instead I use internal APIs that are better fit
for my needs.
In any case, using element traversal you can decently easy check if
content is skipped so that you can indicate an error, simply check if
myElem.nextElementSibling != myElem.nextSibling
/ Jonas