The behavior here should be the same whether or not you're using XrayWrappers: If you remove the parent, you'll end up with a detached subtree. You can modify this subtree, but most of the operations (like loading a web page in an iframe) will only matter when the page gets reinserted into the document.
On Mon, Aug 17, 2015 at 10:32 AM, Manuel Reimer <manuel.rei...@gmx.de> wrote: > Hello, > > maybe someone here can explain some details about the internals of Firefox > to me. > > My addon "EmbedUpdater" replaces <object> and <embed> tags with an > <iframe>, when possible and a known replacement exists. This helps to get > rid of Flash. > > Currently I have some more or less ugly "error handling" code to catch the > case, that, for example, several <object>'s are stacked like this: > > <object data="..."> > <object data="..."> > <object data="..."> > <embed src="..."> > </object> > </object> > </object> > > The potential problem, I see here, is that I get a list of all objects > first (getElementsByTagName) and then loop over them. So it may be possible > that the first <object> in this tree is already gone and replaced if my > code wants to handle the second one. > > I now removed my ugly "protection code" and it seems like it is impossible > to produce any error in this case. It seems like it doesn't matter if the > parent of one of the children is gone. > > So what I would like to know: In which state is my "XRay-object", I use to > get data from a node in a website, if the parent is gone and so the node > itself is no longer on the page? Do I have to handle this case somehow or > is it save to just ignore this case? > > Thank you very much in advance. > > Manuel > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform