15.3. Combining Multiple Bindings
The XBL inheritance system is given an overview in “Object-like Features” earlier in this chapter. This topic is concerned with uses of the inheritance system. Only a binding creator can implement inherited bindings.
15.3.1. Simple Inheritance with extends=
Listing 15.13 show two bindings related by inheritance.
Listing 15.13. Trivial example of XBL binding inheritance.
<!-- both bindings contained in example.xml --> <binding id="smileyA"> <content> <xul:image src="faceA.png"/> </content> <implementation> <method name="methodA"> <body> return true; </body> </method> </implementation> </binding> <binding id="smileyB" extends="example.xml#smileyA"> <content> <xul:image src="faceB.png"/> </content> <implementation> ... |
Get Rapid Application Development with Mozilla™ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.