W3C home > Mailing lists > Public > public-appformats@w3.org > November 2006

[XBL] Clarification: addBinding() and the xbl:script element

From: Marcos Caceres <m.caceres@qut.edu.au>
Date: Tue, 28 Nov 2006 16:11:59 +1000
Message-ID: <2515EDBE2C49604E97ACEDCD606748F664ED10@beeex03.qut.edu.au>
To: <public-appformats@w3.org>
The following relates to Section 3.5 - Binding Attachment Model.  Can
you please clarify the following: 


If I attach a binding to an element using addBiding() (or using CSS
'-xbl-binding:'),  can I still call functions defined in an xbl:script
element from within the implementation of a binding? The 6 steps defined
in section 3.5 do not specify if xbl:script elements in bounding
documents are evaluated and made available in such situations. For
example, can I do the following: 


HTML Doc: 



                var b  = document.getElementById("myButton"); 





XBL Doc (ui.xbl)



                var count = 0; 

                function counterInc(){ return count++;}



<binding id="magicButton">


                ({getNumber: function(){

                                var a = counterInc (); 

                                a = a + "hhhh" + count;

                                return a;


 xblBindingsAttached: function(e){







If I can do the above, then it might be good to state in section 3.5
that the script element is firstly evaluated and made available to


Received on Tuesday, 28 November 2006 06:12:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:50:05 UTC