MDN’s new design is in Beta! A sneak peek:



This document describes Extensible Binding Language (XBL) 1.0 as implemented in Gecko browsers.

Extensible Binding Language is a XML-based markup language to implement reusable components (bindings) that can be bound to elements in other documents. The element with a binding specified, called the bound element, acquires the new behavior specified by the binding. Bindings can be bound to elements using Cascading Style Sheets (CSS) or DOM. One element can be bound to several bindings at once.

Functionally bindings should be correlated with Behaviors and Viewlink but being implemented as one integrated XML solution.

Bindings can contain event handlers that are registered on the bound element, an implementation of new methods and properties that become accessible from the bound element, and anonymous content that is inserted around the bound element.

There are numerous adjustments in the current implementation in comparison of earlier XBL proposals, and not all of them are reflected yet in this document. The documentation process is still in progress: please keep it in your mind while using the provided information.

XBL Elements

XBL 1.0 elements are in the namespace.

Binding Attachment and Detachment

DOM Interfaces

Anonymous Content

Binding Implementations

Event Handlers

Example - Sticky Notes

Updated and adjusted for the current Firefox implementation.

This example is targeted to demonstrate the XBL usage rather than to be a practically useful application. For this reason it contains many comments and some blocks could be avoided in a more compact solution yet used here for demonstration purposes.

View this example

Download all files (.zip archive) need to ask to adjust the server - it gives "Access denied" for zip files (?)


Original Document Information

  • Last Updated Date: April 24, 2006

Document Tags and Contributors

 Last updated by: jonathanKingston,