XUL

XUL
ParadigmDeclarative (markup language)
DeveloperMozilla Foundation
Implementation languageC++
PlatformGecko
OSCross-platform
LicenseMPL
Filename extensions.xul
MIME type: application/vnd.mozilla.xul+xml
Websitehttps://wiki.mozilla.org/XUL:Home_Page
Major implementations
Mozilla
Influenced by
HTML, XML

XUL (/ˈzuːl/ ZOOL), which stands for XML User Interface Language, is a user interface markup language developed by Mozilla. XUL is an XML dialect for writing graphical user interfaces, enabling developers to write user interface elements in a manner similar to web pages.

XUL applications rely on the Mozilla codebase or a fork of it. The most prominent example is the Firefox web browser. However, Mozilla has reduced the usage of XUL in Firefox after their rewrite of the browser engine in version 57. This resulted in the removal of add-on customization. Firefox originally permitted add-ons to extensively alter its user interface, but this capability was removed in 2017 and replaced with the less-permissive WebExtensions API. Several forks of Firefox retain support for XUL and XUL-based add-ons. Waterfox maintains a fork of the Mozilla codebase for the Waterfox Classic browser. The Pale Moon browser, Basilisk browser, Hyperbola operating system, and several smaller projects collectively use and maintain the Unified XUL Platform (UXP) implementation.

History

The Periodic Table of XUL Elements is a reference extension designed to demonstrate XUL's capabilities.

XUL was devised at Netscape in 1997 as part of the development effort that eventually became the Mozilla codebase. XUL is similar to web technologies implemented by the Gecko rendering engine. When XUL was introduced, it added features beyond the then standard HTML 4. It was designed as an expansion of HTML to be used with applications rather than documents.

XUL was used by various Mozilla projects, forks of Mozilla projects, and projects closely related to Mozilla. Some software projects like Zotero began as Mozilla Firefox extensions and used XULRunner to become standalone desktop applications. In the early 2000s there was some interest in using XUL by other parties, including Amazon, but those have switched over to HTML5. The features of HTML5 that made web applications possible, also made much of XUL redundant.

Mozilla released Firefox 57, also known as Firefox Quantum, in 2017. As part of this, Firefox finished transitioning to a multi-process architecture. Although XUL add-ons worked in this architecture, they created large performance problems. Because of this, Mozilla removed support for legacy add-ons, including the use of custom XUL code. Mozilla switched extensions over to Google's HTML5-based WebExtensions format. In 2017, Firefox still included 289 XUL bindings for native browser components. By the end of 2019, Mozilla had removed all XUL files from their mozilla-central codebase.

When Mozilla removed support from Firefox, there were still several applications using XUL. Mozilla began gradually removing XUL support from their email client, Thunderbird. They released Thunderbird 78 without support for XUL-based extensions in 2020. The SeaMonkey internet suite chose to re-implement XUL for the Firefox Quantum codebase and the suite's development has subsequently slowed. The Pale Moon developers forked Mozilla's entire Firefox 52 ESR codebase to create the Unified XUL Platform (UXP) for their Goanna rendering engine. UXP maintains the traditional XUL capabilities. As a result, Pale Moon and other UXP applications have remained single-process but extensible.

Usage

XUL can only be used with the Mozilla codebase (or a fork of it) because the Gecko engine does the XUL rendering.

Application programmers need to define a XUL interface as three discrete sets of components:

  1. Content: the XUL document(s), whose elements define the layout of the user interface
  2. Skin: the CSS and image files, which define the appearance of an application
  3. Locale: the files containing user-visible strings for easy software localization

XUL defines a wide range of elements, which roughly belong to the following types:

The default behavior of XUL widgets can be altered with XBL bindings.

Example

This example shows three buttons stacked on top of each other in a vertical box container:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<windowid="vbox example"title="Example 3...."
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<layout>
<buttonid="yes1"label="Yes"/>
<buttonid="no1"label="No"/>
<buttonid="maybe1"label="Maybe"/>
</layout>
</window>

Ghostbusters reference

The villain of the 1984 film Ghostbusters was the fictional deity Zuul who possesses the character Dana Barrett and declares: "There is no Dana. There is only Zuul." The creators of XUL, which is pronounced the same as Zuul, made the slogan "There is no data. There is only XUL!", part of which became the XML namespace.


This page was last updated at 2023-11-30 07:49 UTC. Update now. View original page.

All our content comes from Wikipedia and under the Creative Commons Attribution-ShareAlike License.


Top

If mathematical, chemical, physical and other formulas are not displayed correctly on this page, please useFirefox or Safari