Re: XBL in document fragments

You need to be very careful here. In IE50 behaviors were only applied 
once inserted. This lead to lots of serious issues (such as non inserted 
elements did not implement the same interface). This was fixed/extended 
in IE55 with element behaviors.

Mozilla is still having this problem and people are complaining about 
it. (Well Moz applies the binding based on css and that only applies to 
nodes inserted into the document.)

Since sXBL is applied using the localName (and the namespace) we need to 
apply the binding as soon as the element is created. This needs to be 
done synchronously so that we can do things like:

var el = document.createElementNS(myns, "something");
el.someMethod();

Since sXBL does not extend the interface of the element this might seem 
like a red herring but XBL2 will definitely allow extending the 
interface (personally I wonder why this is not part of sXBL and whether 
sXBL will really be usable without it) so this needs to be done right 
from the beginning.

erik

Received on Tuesday, 28 September 2004 12:19:38 UTC