W3C home > Mailing lists > Public > www-svg@w3.org > September 2004

Re: XBL in document fragments

From: Cameron McCormack <cam-www-svg@aka.mcc.id.au>
Date: Fri, 17 Sep 2004 10:10:50 +1000
To: www-svg@w3.org
Message-ID: <20040917001050.GB21877@mcc.id.au>

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

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:55 UTC