- From: Ian Hickson <ian@hixie.ch>
- Date: Mon, 24 Aug 2009 23:31:30 +0000 (UTC)
On Fri, 14 Aug 2009, Michael A. Puls II wrote: > On Thu, 13 Aug 2009 22:05:26 -0400, Ian Hickson <ian at hixie.ch> wrote: > > > - Should <object>s exist all the time whether they are attached to the > > > document or not? > > Assuming you mean the plugins, as opposed to the elements themselves, then > > the way the spec is written, the plugin instantiates regardless of whether > > it is in the document or not. > > Are you saying that in the following case (for the Netscape 6.4 WMP plug-in > (the liveconnect-supported one) for example): > > <script> > var obj = document.createElement("object"); > obj.setAttribute("type", "application/x-mplayer2"); > //document.documentElement.appendChild(obj); > window.onload = function() { > setTimeout(function() { > alert(obj.SetFileName); > //document.documentElement.removeChild(obj); > //alert(obj.SetFileName); > }, 10000); > }; > </script> > > that .SetFileName() (a function the plug-in supports), will be > accessible even if the object hasn't been attached yet? Are you also > saying that if it is attached and you remove it from the document that > SetFileName will still be callable? Yes. > If so, that's not what happens in Opera. Pulling the object out of the > document nukes the plug-in instance and an instance isn't created until > you append to the document. Firefox behaves that way with plug-ins too. > And, I think that behavior is required for compat. If it is required for compat, then we should change the spec. Can you confirm that this is the case? Generally, having elements act different out of document is something I'm trying to avoid. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 24 August 2009 16:31:30 UTC