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: <html> <script> var b = document.getElementById("myButton"); b.addBinding(ui.xbl#magicButton); </script> <...> XBL Doc (ui.xbl) <xbl> <script> var count = 0; function counterInc(){ return count++;} <script> <binding id="magicButton"> <implementation> ({getNumber: function(){ var a = counterInc (); a = a + "hhhh" + count; return a; }, xblBindingsAttached: function(e){ alert(this.getInstanceNumber()) }}) </implementation> </binding> </xbl> 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 bindings. MarcosReceived on Tuesday, 28 November 2006 06:12:24 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:10:20 GMT