XBL

XBL (XML Binding Language) is an XML-based markup language used to declare the behavior and look of XUL-widgets and XML elements. Development of the XBL specification was abandoned by the W3C in 2012.

XBL was developed by the Mozilla project for use in the Mozilla Application Suite; the language is not currently described by any formal standard and is thus proprietary to Mozilla, with the only implementation being the Gecko layout engine. XBL 2.0 is the latest version of XBL. XBL 1.0 was first developed at Netscape in 2000 and announced in 2001[1].

In August 2015, Mozilla announced that the use of XBL for creating Firefox add-ons would be deprecated in the future in favour of WebExtensions.[2] Pale Moon, a fork of Firefox, will continue to support XBL indefinitely.[3]

XBL basics

In XUL one defines the user interface layout of an application, and then by applying "styles" one can customize the look of various elements. The drawback is that XUL provides no means to change an element's function. For example, one might want to change how the pieces of a scroll bar work. This is where XBL comes in.

An XBL file contains "bindings", each of which describes the behavior of a XUL-widget or XML element. For example, a binding might be attached to a scroll bar. The behavior describes the properties and methods of the scroll bar and also describes the XUL elements defining the scroll bar.

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');
}

wherein binding1 is the id of the binding.

History and future

XBL was initially developed and implemented as part of the Mozilla platform, alongside the XUL language, so XBL is available in most Mozilla-based products: Firefox, Thunderbird, SeaMonkey etc. There used to be an XBL 1.0 specification document on Mozilla.org, which was submitted to W3C as a Technical Note, but the actual implementation never matched the specification.

The newest version of the specification, called XBL 2.0, was developed to address the problems of XBL 1.0 and to allow for implementation with a broader range of Web browsers. The Candidate Recommendation of the specification was released by W3C in March, 2007.[4] The specification was not implemented by other browser vendors. Work on the XBL 2.0 specification was abandoned by the W3C Working Group in 2012.[5]

In late 2017, Mozilla deprecated XBL and is now in the process of removing it.[6]

Relationship with other specifications

The sXBL specification aims to do for SVG documents what XBL has done for XUL documents. SVG is an XML language proposed by the W3C supporting graphics, animations, embedded media, events and scripted behavior.

XBL 2.0 superseded the sXBL draft,[7] as stated in the W3C Web Application Format Working Group site.[8] Also, the chapters of the sXBL specification are a subset of those of XBL 2.0.

The shadow DOM specification acknowledges XBL as a strong influence.[9]

See also

References

  1. "XBL - XML Binding Language".
  2. Needham, Kev (2015-08-21). "The Future of Developing Firefox Add-ons". blog.mozilla.org. Retrieved 2015-09-07.
  3. "Pale Moon future roadmap". Pale Moon. 2016-05-09. Retrieved 2016-06-08.
  4. "W3C news archive: 2007".
  5. "XBL 2.0". www.w3.org.
  6. "Design Review Packet - XBL Removal". mozilla.github.io. Mozilla. 2017-10-13. Retrieved 2018-04-15 via GitHub Pages.
  7. Raymond, Matthew (2006-09-10). "Re: A question on sXBL and XBL 2.0 from Matthew Raymond on 2006-09-10 (public-appformats@w3.org from September 2006)". lists.w3.org.
  8. "W3C Web Application Formats Working Group". www.w3.org.
  9. "Shadow DOM". w3c.github.io.

Documentation/Browser implementations

Cross-Browser implementations

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.