javascript - Internet explorer and removeChild() -
javascript - Internet explorer and removeChild() -
i have been using elem.removechild() remove elements document, saving javascript reference element, can add together them when appropriate. works fine in firefox , chrome.
now notice that on ie7, elements destroyed in process, having children removed. when add together them same parent element, same type of element , have retained things class name, have no children elements.
is expected behavior? know can alter app things differently, take couple hours of reworking , i'd avoid that. i've assumed ok remove elements, either using removechild() or setting parent's innerhtml empty string, , long had reference element (i.e. variable points element, not element id), ok add together , remove elements freely without having element messed up.
is bug ie, somehow confused , else going on, or known , expected behavior?
the spec removechild doesn't explicitly children of node beingness removed should kept along node, although me seems logical should , ff , chrome developers decided too. don't know spec says if parent's innerhtml set empty string, in sentiment way bit saying "wipe on whatever there" in case think reasonable browser throw away in innerhtml if there references in code of removed elements.
javascript
Comments
Post a Comment