|Paradigm||Declarative (markup language)|
XUL ( ZOOL), which stands for XML User Interface Language, is a user interface markup language that is developed by Mozilla. XUL is implemented as an XML dialect; it allows for graphical user interfaces to be written in a similar manner to Web pages.
XUL can be used to write cross-platform applications such as Mozilla Firefox, where it is interpreted by the layout engine, known as Gecko, which renders Firefox's user interface and Web page display.
In August 2015, Mozilla announced that the use of XUL for creating Firefox add-ons would be deprecated in the future in favour of WebExtensions.Pale Moon, a fork of Firefox for Windows and Linux, will continue to support XUL indefinitely.Waterfox, another fork of Firefox for Windows, macOS, and Linux is planning continued development of an XUL-based browser starting from the last XUL version of Firefox released by Mozilla.
XUL has no formal specification and does not inter-operate with non-Gecko implementations. However, it uses an open-source implementation of Gecko which Mozilla tri-licensed under the GNU GPL, GNU LGPL, and MPL until Gecko changed to GPL-compatible, MPL 2.0.
Programmers typically define a XUL interface as three discrete sets of components:
XUL defines a wide range of elements, which roughly belong to the following types:
While XUL serves primarily for constructing Mozilla applications and their extensions, it may also feature in Web applications transferred over HTTP. The Mozilla Amazon Browser, a former XUL application of this type, provided a rich interface for searching books at Amazon.com.
However, many of the powerful features of Mozilla (such as privileged XPCOM objects) remain unavailable to unprivileged XUL documents unless the script has a digital signature, and unless the user obtains grants of certain[which?] privileges to the application. Such documents also suffer from various limitations of the browser, including the inability to load remote XUL, DTD, and RDF documents.
As Gecko provides the only full implementation of XUL, such applications remain inaccessible to users of browsers not based on Mozilla. Mozilla-programmers sometimes refer to XUL applications running locally as chrome.
Other applications using XUL include:
With the release of Firefox 4, support for remote XUL was disabled by default, due to security concerns. Loading an XUL page via HTTP would now display an error unless the domain was added to a hidden whitelist.
The name "XUL" is a homophonic reference to the cult film Ghostbusters (1984), in which an ancient Sumerian deity called Zuul possesses the character Dana Barrett and declares, "There is no Dana, only Zuul".
The linked document displays the slogan in large letters in the center of the screen.
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"?> <window id="vbox example" title="Example 3...." xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <vbox> <button id="yes1" label="Yes"/> <button id="no1" label="No"/> <button id="maybe1" label="Maybe"/> </vbox> </window>
Manage research, learning and skills at defaultLogic. Create an account using LinkedIn or facebook to manage and organize your IT knowledge. defaultLogic works like a shopping cart for information -- helping you to save, discuss and share.