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.1. Binding Concepts

XBL extends XML and the traditional Web environment the way C++ extends C. It provides object-like features on top of a system that has no object-like features to start with.

15.1.1. An Example Binding

Every XBL document is just a list of bindings, each stated with a <binding> tag. Constructing a binding is similar to constructing an object's class. Listing 15.2 shows a simple XBL binding that is a variant of the XUL <checkbox> tag's binding.

Listing 15.2. Example XBL binding similar to <checkbox>'s binding.
						<?xml version="1.0"?>
						<bindings
						xmlns="http://www.mozilla.org/xbl"
						xmlns:xbl="http://www.mozilla.org/xbl"
						xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
						>
						<binding id="checkbox" extends="general.xml#basetext"> ...

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