Re: XBL in document fragments

Jon Ferraiolo:
> Can you be more concrete with your question, such as provide some sample 
> markup that shows the scenario. The term "document fragment" can mean lots 
> of things.

Sorry.  I mean something like this:

  var df = document.createDocumentFragment();
  df.appendChild(document.createElementNS(myns, "something"));

If there was a definition for my:something in the document, would the
element get a shadow tree here?  I guess the document fragment is a bit
of a red herring to the general form of my question, which would be:
does an element get a shadow tree once it is created, or only once it is
inserted into the document?

Another example:

  var df = document.createDocumentFragment();
  df.appendChild(xblElement); // some XBL to define my:something
  df.appendChild(document.createElementNS(myns, "something"));
  
So now the XBL definitions for my:something are in the document fragment
as well.  If the document fragment is not inserted into the document,
would the my:something element get a shadow tree?

In both of these examples, it would be equivalent if I used an svg:g
element instead of a document fragment, I suppose.

Thanks,

Cameron

-- 
Cameron McCormack
|  Web: http://mcc.id.au/
|  ICQ: 26955922

Received on Friday, 17 September 2004 00:10:52 UTC