Re: Resolving URIs in shadow trees

At 02:13 AM 8/2/2005, Cameron McCormack wrote:

>Hi Jon.
>
>Jon Ferraiolo:
> > but I think everyone would agree that ID referencing within
> > fragment identifiers are processed by
> > currentElement.ownerDocument.getElementById(), except for sXBL shadow
> > trees, where you call getElementById() on the relevant <shadowTree> 
> element
> > that is the root of the shadow tree.
>
>I don't know if I would agree with that.  I'm sure there'd be situations
>where you want a binding document to have some gradients defined (for
>example) that are used by all the shadow trees for a particular binding,
>and you want to use a URI reference that contains only a fragment
>identifier.  It would be a bit messy to have to include the gradient
>element in each generated shadow tree.

Yes, you are correct. The search for matching IDs should always include 
currentElement.ownerDocument.getElementById(), even in shadow trees.

Maybe the rules is that first you call getElementById() on the <shadowTree> 
and then if no match is found then call it on ownerDocument. What do you think?

Jon


>Cameron
>
>--
>   e-mail : cam (at) mcc.id.au           icq : 26955922
>      web : http://mcc.id.au/            msn : cam-msn (at) aka.mcc.id.au
>   office : +61399055779              jabber : heycam (at) jabber.org

Received on Tuesday, 2 August 2005 09:55:45 UTC