J
Joe Kelsey
Does the DOM allow for anything that takes the place of innerHTML?
That particular "feature" seems to have an extremely awkward
interface, not really very well thought out. I thought that maybe
something related to ranges might have something to say about it, but
I can't find anything in the standards docs.
What *I* think the DOM needs is a Document method that accepts a
string and produces a DocumentFragment Node, something like
document.parseHTML ("string"). Then you can take the DocumentFragment
node and insert it whereever you think it belongs. This whole
business of assigning to innerHTML and magically replacing whole
document subtrees just seems like too much magic.
Obviously, we need something which accepts HTML or XML and produces a
valid subtree which you can insert into the document in a controlled
manner. Is something like that in the works? Where would I look for
what the people involved have proposed?
/Joe
That particular "feature" seems to have an extremely awkward
interface, not really very well thought out. I thought that maybe
something related to ranges might have something to say about it, but
I can't find anything in the standards docs.
What *I* think the DOM needs is a Document method that accepts a
string and produces a DocumentFragment Node, something like
document.parseHTML ("string"). Then you can take the DocumentFragment
node and insert it whereever you think it belongs. This whole
business of assigning to innerHTML and magically replacing whole
document subtrees just seems like too much magic.
Obviously, we need something which accepts HTML or XML and produces a
valid subtree which you can insert into the document in a controlled
manner. Is something like that in the works? Where would I look for
what the people involved have proposed?
/Joe