cb575fd3516dcac237f5d4a01a91f29986596a1e
[plcapi.git] / doc / docbook-css / db-bindings.xml
1 <?xml version="1.0"?>\r
2 <bindings xmlns="http://www.mozilla.org/xbl"\r
3      xmlns:html="http://www.w3.org/1999/xhtml">\r
4   <binding id="ulink">\r
5     <handlers>\r
6       <handler event="click" button="0"\r
7                action="window.location=this.attributes.url.value;"/>\r
8       <handler event="mouseover"\r
9                action="window.status=this.attributes.url.value;"/>\r
10       <handler event="mouseout"\r
11                action="window.status=null;"/>\r
12     </handlers>\r
13   </binding>\r
14 \r
15   <binding id="image">\r
16     <content>\r
17       <html:img xbl:inherits="src=fileref"/>\r
18     </content>\r
19 \r
20     <implementation>\r
21       <constructor>\r
22         var img = document.getAnonymousNodes(this)[0];\r
23         var file = this.getAttribute("fileref");\r
24         // HACK: using img.src=file 'inline' doesn't seem to work\r
25         //       but it does when called from a setTimeout()\r
26         var f = function() { img.src = file; }\r
27         setTimeout(f, 0);\r
28       </constructor>\r
29     </implementation>\r
30   </binding>\r
31 </bindings>\r