XBL

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

XBL (XML Binding Language) is an XML-based markup language for altering the behavior of XUL widgets. It has only ever been implemented in the Mozilla codebase.

Mozilla deprecated XBL in 2017 and is now in the process of removing it from the codebase, which is primarily used to build the Firefox web browser.[1][2] However, the UXP fork of the codebase intends to continue supporting XBL indefinitely.[3]

Overview[edit]

XUL defines the user interface layout of an application. CSS rules can be used to change the appearance of various XUL elements. But XBL is needed to alter the behavior of a XUL widget, such as a scroll bar.

An XBL file contains bindings, each of which describes the behavior of a XUL widget. The root element of an XBL file is the <bindings> element, which contains one or more <binding> elements. Each <binding> element declares one binding, which can be attached to any XUL element. It may also possess an id attribute. A binding is assigned to an element by setting the CSS property -moz-binding to the URL of the binding's file. For example:

scrollbar {
  -moz-binding: url('somefile.xml#binding1');
}

History[edit]

XBL was devised at Netscape in the late 1990s as an extension of XUL.[4][5]

The current version of the specification is XBL 2.0. Mozilla attempted to get it standardized by the W3C in 2007,[6] but no other web browser vendors were interested in implementing it. Thus the XBL specification was abandoned in 2012.[7]

The Shadow DOM specification acknowledges XBL as a strong influence.[8]

References[edit]

  1. ^ "Design Review Packet - XBL Removal". mozilla.github.io. Mozilla. 2017-10-13. Retrieved 2018-04-15 – via GitHub Pages.
  2. ^ "XBL Graphs". bgrins.github.io. Retrieved 2019-02-04.
  3. ^ "Pale Moon future roadmap". Pale Moon. Retrieved 2019-02-15.
  4. ^ Jorge O. Castro (2004-06-15). "Ars Technica sits down with Scott Collins from Mozilla.org". Ars Technica. Retrieved 2018-11-28.
  5. ^ "XBL 2.0 Acknowledgments". www.w3.org.
  6. ^ "W3C news archive: 2007".
  7. ^ "XBL 2.0". www.w3.org.
  8. ^ "Shadow DOM". w3c.github.io.