O'Reilly logo

Rapid Application Development with Mozilla™ by Nigel McFarlane

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required