Re: XBL in document fragments

Boris Zbarsky wrote:
> Erik Arvidsson wrote:
> 
>> 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
> 
> 
> Are bindings loaded synchronously at document load?  Or are they 
> expected to be loaded synchronously on-demand?

I'm not totally sure about this. The important part is that both the 
following works:

<p id="p" style="binding:url('test.xml#test')">Foo</p>
<script type="text/javascript">
// assuming the binding adds a test method
document.getElementById("p").test();
</script>

and assuming that the document has defined my:test to have a binding

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

 From a usage perspective it does not really matter if the binding 
document is loaded during load or only when needed. The important part 
that Mozilla and IE50 missed is that the interface of the bound element 
needs to be available all the time.

erik

Received on Tuesday, 28 September 2004 17:33:12 UTC