Search completed in 1.84 seconds.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
before you learn how to develop extensions, let's learn about
xul, the xml-based user-interface language, which is one of the building blocks for extensions.
... introduction an overview of
xul xul is an xml-based language, and was developed to be the gui markup language for the mozilla browser.
... there are earlier experiments going back a long way in developing user interfaces using a combination of html and scripting languages, and
xul could be considered an evolutionary step from that.
...And 68 more matches
XUL Structure - Archive of obsolete content
« previousnext » we'll begin by looking at how the
xul is handled in mozilla.
... how
xul is handled in mozilla,
xul is handled in much the same way as html or other types of content are handled.
...
xul functions in much the same way.
...And 63 more matches
Introduction to XUL - Archive of obsolete content
xul (pronounced "zool," as if that spelling helped any, and short for "xml user interface language") is our name for the language in which these ui descriptions are built.
...
xul is an application of xml.
...a single
xul specification can only cross-platform to a degree.
...And 56 more matches
Getting started with XULRunner - Archive of obsolete content
next » this article explores the mozilla platform by building a basic desktop application using
xulrunner.
...there is an article with a more complicated approach to building
xulrunner applications at creating
xulrunner apps with the mozilla build system.
... if you need to change
xulrunner itself or integrate it with external binaries you may need to read that article.
...And 52 more matches
The Joy of XUL - Archive of obsolete content
this guide is designed to introduce application developers and their managers to
xul so they can not only understand why mozilla's platform is based on it, but how they might adopt it for their own use.
...
xul (pronounced "zool") is mozilla's xml-based user interface language that lets you build feature rich cross-platform applications that can run connected to or disconnected from the internet.
...web developers already familiar with dynamic html (dhtml) will learn
xul quickly and can start building applications right away.
...And 40 more matches
Skinning XUL Files by Hand - Archive of obsolete content
the skin of a
xul file is its look or overall style.
... in
xul, skins are created with cascading style sheets and images.
... to skin a
xul file means to change the overall look of that file by changing its style information.
...And 38 more matches
A XUL Bestiary - Archive of obsolete content
this
xulnote presents some of the key concepts and terms in the
xul development environment.
...i selected items for this group because they seemed to be either shrouded in mystery, misused as concepts or terms, or underestimated according to their role in
xul and cross-platform development.
... in contrast to the mozilla jargon file, this article describes items of specific interest to the web or content developer looking to establish a context for understanding mozilla's new technologies -- and in particular mozilla's xml-based user interface language,
xul.
...And 33 more matches
Using Remote XUL - Archive of obsolete content
introduction note: support for remote
xul has long been a potential security concern; support for it was disabled in gecko 2.0.
... this also means you can't load
xul using file:// urls unless you set the preference dom.allow_
xul_xbl_for_file to true.
... however, there is a whitelist that lets you specify sites that can still use remote
xul.
...And 31 more matches
XULRunner 2.0 Release Notes - Archive of obsolete content
xulrunner 2.0 is a stable release of the mozilla
xulrunner application framework.
... it provides facilities for launching standalone
xul applications and embedding apis which can be used to render web pages within native and java applications.
...
xulrunner 2.0.x is built from the same source code snapshot as firefox 4.0.x.
...And 30 more matches
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
in most cases, developers of
xulrunner applications can download an existing sdk and follow the instructions in getting started with
xulrunner.
...it's a straightforward
xulrunner app that nonetheless uses most of the features any given application is likely to need.
... building
xulrunner do i need to build
xulrunner?
...And 27 more matches
Deploying XULRunner - Archive of obsolete content
current
xulrunner is a stable developer preview release.
... this means that while the release is immature in some areas such as embedding, application deployment, and os integration, it can be used by developers that are releasing standalone
xul applications.
... this document explains how deployment should be managed for self contained portable applications built on
xulrunner.
...And 26 more matches
XUL Questions and Answers - Archive of obsolete content
return to mozilla-dev-tech-
xul summaries the frequently asked questions should be moved to
xul faq (make sure they have a clear answer.) where can i get more information about creating mozsearch plugins?
... is localizing remote
xul possible?
... loading remote dtds for xml documents is currenty not supported in
xul.
...And 25 more matches
XULRunner 1.9.1 Release Notes - Archive of obsolete content
xulrunner 1.9.1 is a stable release of the mozilla
xulrunner application framework.
... it provides facilities for launching standalone
xul applications and embedding apis which can be used to render web pages within native and java applications.
...
xulrunner 1.9.1.x is built from the same source code snapshot as firefox 3.5.x.
...And 24 more matches
XULRunner 1.9.2 Release Notes - Archive of obsolete content
xulrunner 1.9.2 is a stable release of the mozilla
xulrunner application framework.
... it provides facilities for launching standalone
xul applications and embedding apis which can be used to render web pages within native and java applications.
...
xulrunner 1.9.2.x is built from the same source code snapshot as firefox 3.6.x.
...And 24 more matches
XULRunner 1.9 Release Notes - Archive of obsolete content
xulrunner 1.9 is a stable release of the mozilla
xulrunner application framework.
...it provides facilities for launching standalone
xul applications and embedding apis which can be used to render web pages within native and java applications.
...
xulrunner 1.9 is built from the same source code snapshot as firefox 3.
...And 24 more matches
XULRunner 1.8.0.4 Release Notes - Archive of obsolete content
xulrunner 1.8.0.4 is a stable developer preview of the mozilla
xulrunner application framework.
...it provides facilities for launching standalone
xul applications and embedding apis which can be used to render web pages within native and java applications.
... as of december 2008,
xulrunner 1.9.0.4 is available in the "gecko 1.9.0" branch upon which firefox 3 is based.
...And 23 more matches
Custom XUL Elements with XBL - Archive of obsolete content
xbl is heavily used in
xul, but in theory it could be applied to any xml language.
... xbl was submitted to the w3c for standardization, but for now it's used in
xul almost exclusively.
...many complex elements such as tabs, buttons and input controls are implemented using xbl and simpler
xul elements.
...And 21 more matches
Building accessible custom components in XUL - Archive of obsolete content
however, it is less well-known that the same dhtml accessibility techniques can be applied to
xul, mozilla's xml markup language for building user interfaces.
... (the firefox interface itself is built in
xul, as well as the graphical interface presented by firefox extensions.)
xul itself has a much richer set of built-in controls than html.
... there is generally no need to build your own
xul tab bar or treeview.
...And 21 more matches
XULRunner 1.8.0.1 Release Notes - Archive of obsolete content
xulrunner 1.8.0.1 is the first stable developer preview release of
xulrunner.
... it provides facilities for launching standalone
xul applications and embedding apis which can be used to render web pages within native and java applications.
...
xulrunner 1.8.0.4 is now available as a security/stability update; all users should install this new version.
...And 21 more matches
XUL accessibility guidelines - Archive of obsolete content
introduction welcome to the
xul accessibility guidelines.
... by following these principles and practices, you will be able to write your
xul applications in such a way that all users, including those with physical, sensory, or communicative disabilities, with be able to use and enjoy them.
... accessibility is not difficult, but does require a basic understanding of the different types of disabilities, commonly used assistive technologies, and special accessibility features built into the
xul languages.
...And 19 more matches
XULRunner FAQ - Archive of obsolete content
this page is intended to answer frequently asked questions and correct common misconceptions about
xulrunner.
... is
xulrunner a browser?
...you can use
xulrunner to make a browser (mybrowser example or firefox), but there is no such thing as "the
xulrunner browser".
...And 19 more matches
XULRunner tips - Archive of obsolete content
xulrunner frequently asked questions.
...
xulrunner 1.8.0 does not load extensions from the application directory; only the
xulrunner directory and the user profile directory are checked.
... however, it seems that with
xulrunner 1.9 the
xulrunner directory is ignored, while the profile and application directories are checked.
...And 19 more matches
nsIXULTemplateBuilder
the nsitemplatebuilder interface controls the display of elements using a
xul template element and is automatically attached to an element containing a datasources attribute.
...a template builder is attached to a single dom node; this node is called the root node and is expected to contain a
xul template element as a direct child.
...results implement the nsi
xultemplateresult interface and may be identified by an id which must be unique within a given set of query results.
...And 19 more matches
XULRunner Hall of Fame - Archive of obsolete content
see also featured mozilla-based applications, many of which use
xulrunner.
...
xulrunner 5+ based applications these applications use
xulrunner 5 or greater.
...now available with
xulrunner 30 with i18n support.
...And 18 more matches
Building XULRunner with Python - Archive of obsolete content
this page describes how to build and use
xulrunner with the python extension on windows and while generally useful it is written based on experiences with accessibility projects.
... see also
xulrunner.
... or, if you are interested in working with
xulrunner with python on linux, see mark lise's post with the python extensions enabled
xulrunner provides python script access to the dom and xpcom in addition to the usual java script.
...And 16 more matches
Using nsIXULAppInfo - Archive of obsolete content
starting with mozilla/
xulrunner 1.8, there now is a way to find out which application, application version, and gecko version your code is running on.
... nsi
xulappinfo interface to distinguish between different mozilla-based applications, use the frozen nsi
xulappinfo interface.
... the following sections provide a few examples of using nsi
xulappinfo from javascript.
...And 15 more matches
Windows and menus in XULRunner - Archive of obsolete content
« previousnext » our quest to build a basic desktop application using
xulrunner continues.
... last time i installed
xulrunner and built a very simple, bare-bones test application.
... this time i want to add some of the things common to a desktop application user interface: windows and dialogs menus and toolbars os common dialogs controls or widgets windows each window or dialog should be created in its own
xul file.
...And 15 more matches
XUL Overlays
xul files and
xul overlays overlays are
xul files used to describe extra content in the ui.
...overlays provide a general mechanism for: adding ui for additional components, as described in the example above overriding small pieces of a
xul file without having to resupply the whole ui reusing particular pieces of the ui
xul files and overlays work together to describe a single master document.
... though there is no formal restriction on what kind of
xul content is located in "base"
xul files and what kind should be put in overlays,
xul overlays generally define items that are not present in the basic versions of the ui, such as additional components.
...And 15 more matches
Dialogs in XULRunner - Archive of obsolete content
« previous the last article in this series covered some simple
xul for creating windows, menus, and toolbars.
... custom dialogs building dialogs in
xul is very similar to creating windows.
... each dialog is described in its own
xul file.
...And 14 more matches
Writing Skinnable XUL and CSS - Archive of obsolete content
for example, the skin for the navigator package should contain a file called navigator.css that determines the default look of all
xul windows posed from this package.
... your css file should never import another skin file if your file is loaded by a
xul overlay.
... css files that are used by
xul overlays should never import the global skin (or any other skin for that matter).
...And 13 more matches
XUL - Archive of obsolete content
xul tutorial a guided tutorial that will help you get started with
xul, originally from
xulplanet.
...
xul (xml user interface language) is mozilla's xml-based language for building user interfaces of applications like firefox.
... the term
xul is sometimes used to refer to the whole mozilla platform (e.g.
...And 13 more matches
Debugging a XULRunner Application - Archive of obsolete content
the easiest way to debug a
xulrunner application is to get the system to tell you what's wrong!
... /* debugging prefs */ pref("browser.dom.window.dump.enabled", true); pref("javascript.options.showinconsole", true); pref("javascript.options.strict", true); pref("nglayout.debug.disable_
xul_cache", true); pref("nglayout.debug.disable_
xul_fastload", true); don't forget to change these preferences back to their defaults when you've finished debugging; leaving them as-is can significantly harm performance and usability.
... console to enable a console on windows, start
xulrunner with the -console argument.
...And 13 more matches
XUL Migration Guide - Archive of obsolete content
this guide aims to help you migrate a
xul-based add-on to the sdk.
... first we'll outline how to decide whether your add-on is a good candidate for migration via a comparison of the benefits and limitations of the sdk versus
xul development.
... see this comparison of the benefits and limitations of sdk development and
xul development.
...And 12 more matches
XUL accessibility tool - Archive of obsolete content
general information the
xul accessibility tool is a firefox extension designed by aaron andersen of webaim as part of a mozilla foundation accessibility minigrant in the spring of 2007.
... it is designed to test (insofar as automated testing is possible) the guidelines and requirement for creating accessible
xul as set forth in the
xul accessibility guidelines, and to report on any problems found in tested documents.
... availability the
xul accessibility tool can currently be obtained from [http://www.
xulplanet.com/aaron/files...bilitytool.xpi].
...And 12 more matches
nsIXULTemplateQueryProcessor
content/
xul/templates/public/nsi
xultemplatequeryprocessor.idlscriptable a query processor takes a template query and generates results for it given a datasource and a reference point.
...each result will have the four variables referred to defined for it and the values may be retrieved using the result's nsi
xultemplateresult.getbindingfor() and nsi
xultemplateresult.getbindingobjectfor() methods.
...method overview void addbinding(in nsidomnode arulenode, in nsiatom avar, in nsiatom aref, in astring aexpr); print32 compareresults(in nsi
xultemplateresult aleft, in nsi
xultemplateresult aright, in nsiatom avar, in unsigned long asorthints); nsisupports compilequery(in nsi
xultemplatebuilder abuilder, in nsidomnode aquery, in nsiatom arefvariable, in nsiatom amembervariable); void done(); nsisimpleenumerator generateresults(in nsisupports adatasource, in nsi
xultemplateresult aref, in nsisupports aquery); nsisupports getdatasourc...
...And 12 more matches
nsIXULWindow
xpfe/appshell/nsi
xulwindow.idlscriptable please add a summary to this article.
... inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) an nsi
xulwindow is created as part of the creation of a top-level chrome window.
... when the window is destroyed, it will fire a "
xul-window-destroyed" notification through the global observer service.
...And 12 more matches
Using Visual Studio as your XUL IDE - Archive of obsolete content
compared to a simple text-editor, visual studio gives you some special features when writing
xul: intellisense / autocompletion for elements and attributes validation syntax coloring (okay, more sophisticated editors like notepad++ provide this as well) before you can use all of this, you have to adjust visual studio a little.
...setting the correct editor as
xul files are nothing but xml, you can use the normal xml-editor for writing
xul.
...> text editor > file extension and add the extension "
xul" with "xml editor".
...And 11 more matches
How to enable locale switching in a XULRunner application - Archive of obsolete content
this article is for developers who have localised their
xul application using dtd entity files and want to provide their users with a mechanism to switch the locale in the application itself.
...modify the application preferences first, you need to tell
xulrunner that your application wishes to ignore the default os locale and that it will do its own choosing instead.
...defaults/preferences/prefs.js /* don't inherit os locale */pref("intl.locale.matchos", "false");/* choose own fallback locale; later it can be overridden by the user */pref("general.useragent.locale", "en-gb"); note that some distributions of
xulrunner or firefox don't honour the "intl.locale.matchos" setting, so in those cases you won't be able to override the os locale [debian iceweasel bug #417961].
...And 10 more matches
XULRunner - Archive of obsolete content
getting started with
xulrunner a short introduction to
xulrunner.
...
xulrunner is a mozilla runtime package that can be used to bootstrap
xul+xpcom applications that are as rich as firefox and thunderbird.
...
xulrunner also provides lib
xul, a solution which allows the embedding of mozilla technologies in other projects and products.
...And 10 more matches
XUL Parser in Python - Archive of obsolete content
v.00001 to celebrate activestate's recent announcement about support for perl and python in mozilla, i have put together this little python script that parses your local
xul and builds a list of all the
xul elements and their attributes in an html page.
... with new widgets and attributes landing all the time, i wanted to get some quicker way of looking at the
xul--at particular builds, at particular widgets, at which elements had which attributes, etc.
...python's support for xml (and potential with
xul) is extensive, and so it's more a matter of choosing an approach and hooking things up than anything else.
...And 10 more matches
XUL user interfaces - Archive of obsolete content
mozilla overcomes this limitation by providing a specialized language for creating user interfaces:
xul (xml user-interface language, usually pronounced like "zool").
... in
xul, many common user interface features are built in.
... for example,
xul provides specialized windows like dialogs and wizards, as well as status bars, menus, tool bars, and even browsers.
...And 9 more matches
Using the Editor from XUL - Archive of obsolete content
overview the editor in
xul lives on top of a
xul <iframe> element; it observes document loading in this <iframe>, and, when document loading is complete, it instantiates an editor on the loaded document.
...you can find the relevant
xul parts in editor.
xul, the javascript parts in editor.js, and the xbl binding for the editor element in editor.xml.
...editor.
xul is loaded.
...And 9 more matches
XUL Coding Style Guidelines - Archive of obsolete content
introduction
xul, pronounced as "zool", stands for "xml-based user interface language", is a cross platform way of describing user interface.
... it could contain
xul specific element types for ui controls, html4 markups for content data, and even javascript for user event handling.
... to make
xul files easy to read and maintain, localization friendly, and portable across user agents, we need to have a set of coding style guidelines to ensure our objectives are achievable.
...And 9 more matches
XUL Event Propagation - Archive of obsolete content
this article describes the event model in
xul and features event propagation as a way to handle events in different places in the interface.
... introduction
xul events were introduced in a very general way in a previous
xulnote.
... but to use events effectively in
xul, you must be aware of what the actual process for raising, listening to, and handling events is.
...And 9 more matches
nsIXULAppInfo
xpcom/system/nsi
xulappinfo.idlscriptable this interface provides information about the host application.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) in
xulrunner applications nsi
xulappinfo obtains app-specific information from application.ini.
...to create an instance, use: var
xulappinfo = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsi
xulappinfo); the nsi
xulruntime interface is also implemented by "xre/app-info".
...And 9 more matches
Building a Thunderbird extension 5: XUL
thunderbird's user interface is written in
xul and javascript.
...
xul is an xml grammar that provides user interface widgets like buttons, menus, toolbars, trees etc.
... we add widgets by inserting new
xul dom elements into the application window and modify them using scripts and attaching event handlers.
...And 9 more matches
XUL Template Primer - Bindings - Archive of obsolete content
see
xul:template guide for up to date documentation.
... overview this document expands on the
xul template primer by introducing the <bindings> element in the extended
xul template syntax.
... example to illustrate how <bindings> work, we'll examine this
xul document, which builds a simple content model an rdf/xml file.
...And 8 more matches
Building XULRunner - Archive of obsolete content
xulrunner is built using basically the same process as firefox or other applications.
... by default,
xulrunner is built with javaxpcom support; the build system must be able to find an appropriate jdk on the system; see the instructions on building javaxpcom for more details.
... on mac,
xulrunner requires mac os x 10.3 or higher and xcode 1.5 or higher to build properly.
...And 8 more matches
XUL Application Packaging - Archive of obsolete content
xulrunner application packages are standard toolkit bundles (like a firefox extension), with one additional manifest file (application.ini) which helps describe the application.
...
xul app packages are typically zipped into an archive with the extension .
xulapp or .xpi.
... they can be installed to
xulrunner with a command line flag "--install-app" if
xulrunner is registered on the system.
...And 8 more matches
XUL Explorer - Archive of obsolete content
xul explorer is a
xulrunner application that provides an easy way to experiment with
xul.
... it’s a simple editor that can preview
xul inline or in a separate popup window.
... it has a list of code snippets (small fragments of
xul or javascript) that can be quickly inserted into the editor.
...And 8 more matches
HTML in XUL for rich tooltips - Archive of obsolete content
this example demonstrates the dynamic injection of html into a
xul element.
... dynamic html in
xul tooltip insert the appropriate code from below into your
xul overlay.
... this example is what the final
xul overlay could look like, assuming a javascript overlay titled overlay.js: <?xml version="1.0" encoding="utf-8"?> <overlay id="htmltip-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" xmlns:html="http://www.w3.org/1999/xhtml"> <script type="application/x-javascript" src="overlay.js"/> <popup id="contentareacontextmenu"> <menuitem id="htmltip1" label="foo1" onmouseover="htmltip.onmousetooltip(event)" tooltip="myhtmltip" /> <menuitem id="htmltip2" label="foo2" onmouseover="htmltip.onmousetooltip(event)" tooltip="myhtmltip" /> </popup> <popupset id="mainpopupset"> <tooltip id="myhtmltip"> <html:div id="myhtmltipdiv" type="content"/> ...
...And 7 more matches
XUL element attributes - Archive of obsolete content
«
xul reference home the following attributes are common to all
xul elements: align type: one of the values below the align attribute specifies how child elements of the box are aligned, when the size of the box is larger than the total size of the children.
... when the
xul document is contained on a remote web site, the datasources may only be loaded from the same domain as the document.
... normal for scales, the scale's values are ordered from left to right (for horizontal scales) or from top to bottom (for vertical scales) for other elements, the elements are placed left to right or top to bottom in the order they appear in the
xul code.
...And 6 more matches
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
a
xulrunner application has no installer by default; however, these instructions can help you to easily create a windows installer with inno setup.
... the tutorial here uses the my app example from the article getting started with
xulrunner.
... step 2: creating the application to make your application standalone, deploy your application according to the deploying
xulrunner 1.8 article.
...And 6 more matches
XUL FAQ - Archive of obsolete content
this document contains answers to frequently asked questions about
xul, mozilla's markup language for describing application's user interface.
... if your question is not answered here, you can try looking for the answer in the
xul documentation or ask in the
xul newsgroup.
... are there decent visual editors for laying out
xul applications?
...And 5 more matches
Using LDAP XPCOM with XULRunner - Archive of obsolete content
by default,
xulrunner is built without ldap xpcom support.
... if you want to use ldap components in your
xul application, you have two options : compile
xulrunner with ldap support enabled, or add ldap xpcom directly to your
xul app (in the components directory).
...see the build_documentation for more information about how to build
xulrunner.
...And 5 more matches
Things I've tried to do with XUL - Archive of obsolete content
feel free to add your own
xul experiences here.
... how do i use percentage-based height/width with
xul?
...(to add insult,
xul layout code *explicitly* trims off '%' from width/height, thus treating it as pixels.) for reference, i'd like the following to give a vbox that resizes along with the window, with the green, red, and blue inside boxes always maintaining a 30%-20%-50% ratio to the height of the parent vbox.
...And 4 more matches
Remote XUL - Archive of obsolete content
how to use
xul delivered from a webserver, not as part of chrome.
... note: support for remote
xul has long been a potential security concern; support for it was disabled in gecko 2.0.
... this also means you can't load
xul using file:// urls unless you set the preference dom.allow_
xul_xbl_for_file to true.
...And 3 more matches
Accessibility/XUL Accessibility Reference - Archive of obsolete content
this table is designed to show how to expose text properly for various
xul element types.
...however, this attribute causes any
xul loaded in the browser to have issues with jaws 7.10.
... we believe they are using the window class to determine that it is content rather than dialog, but does not support content mode for
xul.
...And 3 more matches
nglayout.debug.disable_xul_cache
to improve performance, mozilla caches chrome
xul documents the first time they load for faster loading later.
...the
xul cache is serialized and saved between mozilla sessions in the
xul fastload file, which saves a “compiled” version of the
xul and javascript in a document to disk for faster startup the next time the application runs.
... during development of
xul applications, it’s convenient to disable the
xul cache so that changes you make to files on disk take effect the next time the window or dialog is loaded (instead of the next time mozilla starts).
...And 3 more matches
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
many add-ons need to dynamically generate dom content, either
xul or html, from their scripts.
... json templating jsontodom.namespaces = { html: "http://www.w3.org/1999/xhtml",
xul: "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" }; jsontodom.defaultnamespace = jsontodom.namespaces.html; function jsontodom(jsontemplate, doc, nodes) { function namespace(name) { var reelemnameparts = /^(?:(.*):)?(.*)$/.exec(name); return { namespace: jsontodom.namespaces[reelemnameparts[1]], shortname: reelemnameparts[2] }; } // note that 'elemname...
...event listeners can be defined on the given nodes by passing functions rather than strings to on* attributes: var href = "http://www.google.com/"; var text = "google"; var nodes = {}; document.documentelement.appendchild( jsontodom(["
xul:hbox", {}, ["div", {}, ["a", { href: href, key: "link", onclick: function (event) { alert(event.target.href); } }, text], ["span", { class: "stuff" }, "stuff"]]], document, nodes)); alert(nodes.link); function addentrytopopup(menupopup, doc, chromewindow) { var newitem = doc.createelement("menuitem"...
...And 2 more matches
Kill the XUL.mfl file for good - Archive of obsolete content
avoiding the creation of the
xul.mfl file mozilla creates in its profile directory a file named
xul.mfl, which contains pre-compiled ui elements.
... loading these files from the server, and storing them back slows down the network, thus it may actually be faster without than with
xul.mfl occasionnally gets corrupted, needing a manual intervention to wipe it out, before mozilla again works correctly.
... with quicklauncer (see above), mozilla's speed is actually quite adequate, even without
xul.mfl for these reasons, it is desirable to disable the
xul.mfl functionality.
...And 2 more matches
International characters in XUL JavaScript - Archive of obsolete content
gecko 1.8, as used in firefox 1.5 and other applications, added support for non-ascii characters in javascript files loaded from
xul files.
... earlier versions always interpreted js files loaded from
xul as iso-8859-1 (latin-1), in both local and remote cases.
...otherwise, the character encoding will be the same as the one used by the
xul file (which can be specified using an encoding attribute in the <?xml?> tag).
...And 2 more matches
Modifying a XUL Interface - Archive of obsolete content
you can then set attributes of the element using the setattribute() function and append it to the
xul document using the appendchild() function.
... for example, the following will add a button to a
xul window: example 1 : source view <script> function addbutton(){ var abox = document.getelementbyid("abox"); var button = document.createelement("button"); button.setattribute("label","a new button"); abox.appendchild(button); } </script> <box id="abox" width="200"> <button label="add" oncommand="addbutton();"/> </box> this example has two parts a box container element in
xul.
...this is a subtle dependency between the function and the
xul element to which you should pay attention.
...And 2 more matches
XUL Tutorial - Archive of obsolete content
this tutorial describes
xul, the xml user-interface language.
... introduction introduction
xul structure the chrome url manifest files simple elements creating a window adding buttons adding labels and images input controls numeric controls list controls progress meters adding html elements using spacers more button features the box model the box model element positioning box model details groupboxes adding more elements more layout elements stacks and decks stack positioning tabboxes grids content panels splitters toolbars and menus toolbars simple menu bars more menu features popup menus scrolling menus events and scripts adding event handlers more event handlers keyboard shortcuts focus and selection...
... commands updating commands broadcasters and observers document object model document object model modifying a
xul interface manipulating lists box objects xpcom interfaces xpcom examples trees trees more tree features tree selection custom tree views tree view details tree box objects rdf and templates introduction to rdf templates trees and templates rdf datasources advanced rules persistent data skins and locales adding style sheets styling a tree modifying the default skin creating a skin skinning
xul files by hand localization property files bindings introduction to xbl anonymous content xbl attribute inheritance adding properties adding methods adding event handlers xbl inheritance creating reusable content using css and xbl xbl e...
...And 2 more matches
XUL Accesskey FAQ and Policies - Archive of obsolete content
on macintosh, accesskeys are available only in html not in
xul, and they are activated using ctrl+letter instead of alt.
...an accesskey can be added to an html or
xul form control or label by using the accesskey attribute.
... for example, here's how we add an accesskey to a
xul button: <button label="apply instantly" accesskey="a" /> apply instantly - or - <button label="apply instantly" accesskey="a" /> apply instantly in mozilla, we use dtd's for one more layer of abstraction, for purposes of internationalization.
...And 2 more matches
XULRunner/Old Releases - Archive of obsolete content
1.9.2.x
xulrunner releases these builds are built from the stable 1.9.2 branch.
... nightly builds of
xulrunner 1.9.0.x these builds are built from the stable 1.9 branch.
... community contributed builds of
xulrunner 1.8.1.3 these builds are contributed by the eclipse atf community and are intended for embedding.
...And 2 more matches
What XULRunner Provides - Archive of obsolete content
the goal of
xulrunner is to provide a solution for deploying
xul applications (primarily firefox and thunderbird), as well as providing an embedding mechanism.
... the following features are either already implemented or planned: gecko features xpcom networking gecko rendering engine dom editing and transaction support (no ui) cryptography xbl (xbl2 planned)
xul svg xslt xml extras (xmlhttprequest, domparser, etc.) web services (soap) auto-update support (not yet complete) type ahead find toolbar history implementation (the places implementation in the 1.9 cycle) accessibility support ipc services for communication between gecko-based apps (not yet complete) storage/sqlite interfaces user interface features the following user interface is supplied by
xulrunner, and may be overridden by embedders under certain circumstances: apis and user interface for installing, uninstalling, and upgrading
xul applications.
... see the wikimo:
xul:installation story.
...And 2 more matches
XUL Booster - Archive of obsolete content
xul booster is a third party eclipse / webtools build that offers some support for
xul editing and awesome support for extension packaging.
... extension quick start
xul booster makes creating and packaging an extension very easy.
...chrome://browser/content/browser.
xul.
...And 2 more matches
XUL Accessibility
introduction this article shows how
xul control elements are mapped to accessibility api.
...aggregating the text from element subtree if the child node is hidden then it's ignored excepting the case when the element used as label is hidden itself if the child node is text node then its rendered value is appended if the child node is element then if it implements nsidom
xullabeledcontrolelement then the value of label property is appended otherwise if it's a label element then then value attribute is appended otherwise append tooltiptext attribute append the accessible value searching specific element in neighbour of the element search inside the element subtree go up through parents (max level is 5) and search inside theirs subtrees if the element is anonymo...
...us then search in whole anonymous subtree, here the attribute anonid is used instead of id attribute accessible properties this section describes common rules how accessibility properties are formed for
xul elements.
...And 2 more matches
nsIXULBuilderListener
content/
xul/templates/public/nsi
xulbuilderlistener.idlscriptable this object is a listener that will be notified when a template builder rebuilds its content.
... inherits from: nsisupports last changed in gecko 1.7 method overview void didrebuild(in nsi
xultemplatebuilder abuilder); void willrebuild(in nsi
xultemplatebuilder abuilder); methods didrebuild() called after a template builder has rebuilt its content.
... void didrebuild( in nsi
xultemplatebuilder abuilder ); parameters abuilder the template builder that has rebuilt the content.
...And 2 more matches
XUL Events - Archive of obsolete content
«
xul reference home the following tables and sections describe the event handler that are valid for most
xul elements.
...
xul event reference subpages broadcastthe broadcast event is executed when the attributes of the element (such as a broadcaster) being listened to are changed.
...you should not use this event in
xul to respond to user actions; the command event should be used instead.
... common
xul events event description broadcast the event handler should be placed on an observer.
XUL Changes for Firefox 1.5 - Archive of obsolete content
this lists the most notable changes to
xul in firefox 1.5 (gecko 1.8).
... for other changes you should be aware of, see adapting
xul applications for firefox 1.5.
...see
xul:richlistbox for more information.
... loading overlays dynamically
xul now supports loading overlays dynamically with the document.loadoverlay function.
XUL Reference - Archive of obsolete content
«
xul reference « alphabetical list of all
xul elements action arrowscrollbox assign bbox binding bindings box broadcaster broadcasterset button browser checkbox caption clicktoscroll colorpicker column columns commandset command conditions content datepicker deck description dialog dialogheader dropmarker editor grid grippy groupbox hbox iframe image key keyset label listbox listcell listcol listcols listhead listheader listitem member menu menubar menuitem menulist menupopup menuseparator notification notificationbox observes overlay page panel param popupset preference preferences prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlistbox richlistitem row rows rule scale scr...
... textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepicker titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple vbox where window wizard wizardpage categorical list of all
xul elements «
xul reference « windows window wizard wizardpage titlebar window structure --- menus and popups --- toolbars toolbar toolbarbutton toolbargrippy toolbaritem toolbarpallete toolbarseperator toolbarspring tabs and grouping tab tabbox tabpanel tabpanels tabs controls --- text and images label caption image lists --- ...
... trees --- layout --- templates --- scripting --- helper elements other
xul lists dialog overlay page window wizard wizardpage preference preferences prefpane prefwindow browser tabbrowser editor iframe titlebar resizer statusbar statusbarpanel dialogheader notification notificationbox menubar menu menuitem menuseparator menupopup panel tooltip popupset toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tabbox tabs tab tabpanels tabpanel groupbox caption separator spacer button checkbox colorpicker datepicker menulist progressmeter radio radiogroup scale splitter textbox textbox (firefox autocomplete) textbox (mozilla autoc...
... scrollbox action assign binding bindings conditions content member param query queryset rule template textnode triple where script commandset command broadcaster broadcasterset observes key keyset stringbundle stringbundleset arrowscrollbox dropmarker grippy scrollbar scrollcorner spinbuttons all attributes all properties all methods attributes defined for all
xul elements style classes event handlers deprecated/defunct markup ...
xulauncher - Archive of obsolete content
#!/bin/bash -e # a simple bash script to create a minimal
xulrunner dir structure and # needed meta files in /tmp, copy the
xul-file over and start it # usage: #
xulauncher
xulfile.
xul [options] ############################################################################## # check if theres atleast one parameter ############################################################################## if [ $# -lt 1 ] then echo "you need to give the
xul file as first parameter" exit fi # check if 1st parameter is a file ############################################################################## if [ !
... -f "$1" ] then echo "\"$1\" is not a file" exit fi # define some variables ############################################################################## wd=/tmp ext=".
xul"
xulfile=`basename $1`
xulname=${
xulfile%$ext}
xuldir="$wd/$
xulname/chrome/$
xulname/"
xulprefdir="$wd/$
xulname/defaults/preferences"
xulappini="$wd/$
xulname/application.ini"
xulmanifest="$wd/$
xulname/chrome/chrome.manifest"
xulprefs="$wd/$
xulname/defaults/preferences/prefs.js" # make minimal directory structure ############################################################################## mkdir -p $
xuldir mkdir -p $
xulprefdir # create application.ini file ############################################################################## echo " [app] vendor=
xulauncher.sh name=$
xulname version=0.0.1 buildid=`date +%y%m%...
...d` [gecko] minversion=1.8 maxversion=1.9 ">$
xulappini # create chrome.manifest file ############################################################################## echo " content $
xulname file:$
xulname/ ">$
xulmanifest # create prefs.js file ############################################################################## echo " pref(\"toolkit.defaultchromeuri\", \"chrome://$
xulname/content/$
xulfile\"); /* debugging prefs */ pref(\"browser.dom.window.dump.enabled\", true); pref(\"javascript.options.showinconsole\", true); pref(\"javascript.options.strict\", true); pref(\"nglayout.debug.disable_
xul_cache\", true); pref(\"nglayout.debug.disable_
xul_fastload\", true); ">$
xulprefs # copy
xul file to right location and run it #########################################################################...
...##### cp $
xulfile $
xuldir
xulrunner $
xulappini $@ ...
nglayout.debug.disable xul fastload
the preference nglayout.debug.disable_
xul_fastload controls whether or not
xul fastload is used.
... never set nglayout.debug.disable_
xul_fastload to true in a production environment; it exists solely to aid in debugging.
... bugs: values false (default)
xul fastload is used.
... true
xul fastload is disabled.
nsIXULBrowserWindow
xpfe/appshell/public/nsi
xulbrowserwindow.idlscriptable provides methods that may be called from the internals of the browser area to tell the containing
xul window to update its user interface.
... inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) the
xulbrowserwindow attribute exists on the nsi
xulwindow interface although both firefox and seamonkey also store their nsi
xulbrowserwindow reference in the global
xulbrowserwindow object accessible from javascript code.
... note: the
xulbrowserwindow object offered to javascript code provides a great many more methods and attributes than those listed here, which are only the ones available to c++ code.
... see the documentation for
xulbrowserwindow for details.
XUL Parser in Python/source - Archive of obsolete content
source code for the
xul parser in python.
... import sys, glob, xmllib import os, re el_list = {} w = open('res.html', 'w') # unfortunately, i had to put this hack in here to suppress the printing out of the resolved namespace: # "xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul window", etc.
... def strip(snip): t = re.sub('http://.*?\s', '', snip) return t class
xulparser(xmllib.xmlparser): def unknown_starttag(self, t, a): name = strip(t) if name not in el_list: el_list[name] = {} for attr,val in a.items(): el_list[name][strip(attr)] = strip(val) def syntax_error(self, message): pass p =
xulparser() cmd = 'dir /s /b *.
xul' chrome_dir = 'c:\program files\netscape\netscape 6\chrome' os.chdir(chrome_dir) files = os.popen(cmd).readlines() for file in files: file = file.strip() print '** ' + file + ' **' data = open(file).read() p.feed(data) w.write('<html><h3>periodic table of
xul elements</h3>') w.write('<table><style>.head {font-weight: bold; background-color: lightgrey;}</style>') elements = el_list.keys() elements.sort() for item in elements: w.writ...
XULBrowserWindow - Archive of obsolete content
the
xulbrowserwindow object provides methods and properties that let the browser update the user interface of the enclosing
xul window.
... in order to do so it implements the following interfaces: nsisupports nsi
xulbrowserwindow nsiwebprogresslistener nsiwebprogresslistener2 nsisupportsweakreference note: this page is not complete at this time.
...you may also wish to refer to the implementation of
xulbrowserwindow in browser/base/content/browser.js.
XUL and RDF - Archive of obsolete content
the first section of the document describes the motivation and reasoning behind using rdf as the foundation of
xul.
... this section makes a technical argument both for having
xul in the first place and for using rdf as the underlying implementation of
xul's content model.
... the second section describes the
xul/rdf architecture itself and outlines enhancements to the
xul language in order to allow the markup language to reference local data and to indicate how and when it would like to be annotatable with local data.
XUL controls - Archive of obsolete content
the following table lists the
xul user interface controls.
... for a step-by-step guide on how to use these controls, see the
xul tutorial.
... for more reference information, see the
xul reference.
nsIDOMXULSelectControlElement
dom/interfaces/
xul/nsidom
xulselectcntrlel.idlscriptable please add a summary to this article.
... inherits from: nsidom
xulcontrolelement last changed in gecko 1.9 (firefox 3) method overview nsidom
xulselectcontrolitemelement appenditem(in domstring label, in domstring value); long getindexofitem(in nsidom
xulselectcontrolitemelement item); nsidom
xulselectcontrolitemelement getitematindex(in long index); nsidom
xulselectcontrolitemelement insertitemat(in long index, in domstring label, in domstring value); nsidom
xulselectcontrolitemelement removeitemat(in long index); attributes attribute type description itemcount unsigned long read only.
... selectedindex long selecteditem nsidom
xulselectcontrolitemelement value domstring methods appenditem() nsidom
xulselectcontrolitemelement appenditem( in domstring label, in domstring value ); parameters label value return value getindexofitem() long getindexofitem( in nsidom
xulselectcontrolitemelement item ); parameters item return value getitematindex() nsidom
xulselectcontrolitemelement getitematindex( in long index ); parameters index return value insertitemat() nsidom
xulselectcontrolitemelement insertitemat( in long index, in domstring label, in domstring value ); parameters index label value return value removeitemat() nsidom
xulselectcontrolitemelement removeitemat( in long index ); parameters index return value ...
nsIXULRuntime
xpcom/system/nsi
xulruntime.idlscriptable provides information about the
xul runtime to allow extensions and
xul applications to determine information about the
xul runtime.
...to get an instance, use: var
xulruntime = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsi
xulruntime); method overview void invalidatecachesonrestart(); attributes attribute type description accessibilityenabled boolean if true, the accessibility service is running.
... example display the user's operating system in an alert box: var
xulruntime = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsi
xulruntime); alert(
xulruntime.os); see also nsi
xulappinfo - a related interface providing information about the host application, it's also implemented by xre/app-info.
nsIXULSortService
content/
xul/templates/public/nsi
xulsortservice.idlscriptable a service used to sort the contents of a
xul widget.
...void sort( in nsidomnode anode, in astring asortkey, in astring asorthints ); parameters anode a node in the
xul widget whose children are to be sorted.
...asorthints one or more hints as to how to sort: ascending: sort the contents in ascending order descending: sort the contents in descending order comparecase: perform case sensitive comparisons integer: treat values as integers, non-integers are compared as strings twostate: do not allow the natural (unordered state) see also nsi
xultemplatequeryprocessor ...
nsIXULTemplateResult
content/
xul/templates/public/nsi
xultemplateresult.idlscriptable a single result generated from a template query.
...both the query as compiled by the query processor's nsi
xultemplatequeryprocessor.compilequery() method and the
xul <rule> element are supplied.
... see also nsi
xultemplatequeryprocessor ...
SDK and XUL Comparison - Archive of obsolete content
although you can write traditional add-ons that are restartless, you can't use
xul overlays in them, so most traditional add-ons would have to be substantially rewritten anyway.
... advantages of
xul-based add-ons user interface flexibility
xul overlays offer a great deal of options for building a ui and integrating it into the browser.
system/xul-app - Archive of obsolete content
with the exception of ids, each of these properties exposes the attribute of the same name on the nsi
xulappinfo interface.
... platformversion the gecko/
xulrunner platform version.
XUL School Tutorial - Archive of obsolete content
xul school is a comprehensive add-on development tutorial, focusing on firefox extension development.
... adding menus and submenus adding toolbars and toolbar buttons adding events and commands adding windows and dialogs adding sidebars user notifications and alerts intermediate functionality intercepting page loads connecting to remote content handling preferences local storage advanced topics the box model xpcom objects observer notifications custom
xul elements with xbl mozilla documentation roadmap useful mozilla community sites appendices appendix a: add-on performance appendix b: install and uninstall scripts appendix c: avoiding using eval in add-ons appendix d: loading scripts appendix e: dom building and html insertion appendix f: monitoring dom changes the
xul school project was developed by appcoast (forme...
onunload - XUL
«
xul reference home onunload type: script code specifies a set of scripts to execute when the browser window is closed by the user.
Index - Archive of obsolete content
we will show how to do each of these things using the built-in components object provided by
xulrunner application such as firefox and thunderbird.
... 35 sdk and
xul comparison no summary!
... 39
xul migration guide no summary!
...And 1253 more matches
Index - Archive of obsolete content
found 1218 pages: # page tags and summary 1
xul landing, mozilla,
xul xul (xml user interface language) is mozilla's xml-based language for building user interfaces of applications like firefox.
... 2 <statusbarpanel> deprecated,
xul,
xul elements,
xul reference an individual element of a statusbar.
... 3 a
xul bestiary add-ons, extensions, needstechnicalreview,
xul this
xulnote presents some of the key concepts and terms in the
xul development environment.
...And 1140 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
the chapters so far have each focused on technologies in isolation—
xul, javascript, css, and xpcom.
... preference description value nglayout.debug.disable_
xul_cache (not present in firefox 3.5+) ordinarily, firefox will cache
xul documents after they have been read in once, to speed subsequent displays.
... disabling this cache forces
xul documents to be reloaded any every time they are displayed.
...And 53 more matches
The Essentials of an Extension - Archive of obsolete content
<em:id>helloworld@
xulschool.com</em:id> this is the unique identifier for the extension.
... <em:name>
xul school hello world</em:name> <em:description>welcome to
xul school!</em:description> <em:version>0.1</em:version> <em:creator>appcoast</em:creator> <em:homepageurl>https://developer.mozilla.org/docs/
xul_school</em:homepageurl> this is the data that is displayed before and after the extension is installed, that you can see in the add-ons manager.
...a localized description and name can be added with the following code: <em:localized> <description> <em:locale>es-es</em:locale> <em:name>
xul school hola mundo</em:name> <em:description>bienvenido a
xul school!</em:description> </description> </em:localized> the es-es locale string indicates that this is the spanish (es) localization for spain (es).
...And 53 more matches
The Implementation of the Application Object Model - Archive of obsolete content
the first section of the document describes the motivation and reasoning behind using rdf as the foundation of
xul.
... this section makes a technical argument both for having
xul in the first place and for using rdf as the underlying implementation of
xul's content model.
... the second section describes the
xul/rdf architecture itself and outlines enhancements to the
xul language in order to allow the markup language to reference local data and to indicate how and when it would like to be annotatable with local data.
...And 37 more matches
RDF in Mozilla FAQ - Archive of obsolete content
second, and more importantly, the rdf model is used along with
xul templates as an abstract "api" for displaying information.
...by loading chunks of it into a
xul ui from a remote site), don't forget to let mozilla-rdf and the rdf interest group lists know.
...there are several security restrictions on accessing built-in datasources from "untrusted"
xul and js.
...And 28 more matches
Building the WebLock UI
it uses
xul, which is an xml language that gecko knows how to render as user interface, but it also interacts with particular parts of the mozilla user interface, where it must install itself as an extension to the ui.
... weblock indicator in browser user interface package list the user interface described in this section is comprised of four files: weblockoverlay.
xul is the file that defines the little status icon in the browser.
... weblock.
xul defines the web lock manager dialog.
...And 28 more matches
nsIWindowMediator
implemented by: @mozilla.org/appshell/window-mediator;1 as a service: var windowmediator = components.classes["@mozilla.org/appshell/window-mediator;1"] .getservice(components.interfaces.nsiwindowmediator); method overview void addlistener(in nsiwindowmediatorlistener alistener); boolean calculatezposition(in nsi
xulwindow inwindow, in unsigned long inposition, in nsiwidget inbelow, out unsigned long outposition, out nsiwidget outbelow); native code only!
... nsisimpleenumerator getenumerator(in wstring awindowtype); nsidomwindow getmostrecentwindow(in wstring awindowtype); nsidomwindow getouterwindowwithid(in unsigned long long aouterwindowid); nsisimpleenumerator get
xulwindowenumerator(in wstring awindowtype); pruint32 getzlevel(in nsi
xulwindow awindow); native code only!
... nsisimpleenumerator getzorderdomwindowenumerator(in wstring awindowtype, in boolean afronttoback); nsisimpleenumerator getzorder
xulwindowenumerator(in wstring awindowtype, in boolean afronttoback); void registerwindow(in nsi
xulwindow awindow); native code only!
...And 27 more matches
Index
here is the interface, and a description of its use.</t> 10 how to pass an xpcom object to a new window needsexample, needshelp if you want to be able to call functions within an xpcom object from a
xul window's code, you can do so if you pass the xpcom object as one of the arguments to the window creation method.
...xpconnect is part of firefox and is actively used in
xul applications.
... 73 setting http request headers add-ons, extensions, http,
xul,
xulrunner http is one of the core technologies behind the web.
...And 25 more matches
The Box Model - Archive of obsolete content
« previousnext » in order to master
xul, you'll need to have a fairly good understanding of its box model.
... this is the system that determines how all elements are laid out visually in a
xul document.
... the
xul box model is a significant improvement over the html layout model, which is mostly vertical.
...And 24 more matches
Introduction - Archive of obsolete content
next » this tutorial is a guide to learning
xul (xml user interface language) which is a cross-platform language for describing applications' user interfaces.
... what is
xul and why was it created?
...
xul (pronounced "zool" and rhyming with "cool") was created to make development of the mozilla browser easier and faster.
...And 24 more matches
XML - Archive of obsolete content
what does
xul have to do with xml?
... this article describes the relationship of
xul to xml, its parent language.
...
xul syntax & rules
xul is a standards-based interface definition language.
...And 24 more matches
Document Object Model - Archive of obsolete content
« previousnext » the document object model (dom) can be used with
xul elements to get information about them or modify them.
... dom introduction the document object model (dom) is used to store the tree of
xul nodes.
... when an
xul file is loaded, the tags are parsed and converted into a hierarchical document structure of nodes, one for each tag and block of text.
...And 23 more matches
nsIAccessibleRole
the role is used by
xul:menubar or role="menubar".
...the role is used by
xul:browsermessage, role="alert", xforms:message.
...it is used for
xul:menuitem, role="menuitem".
...And 23 more matches
List of Mozilla-Based Applications - Archive of obsolete content
abstract accounting tool adobe acrobat and adobe reader portable document format (pdf) software uses mozilla spidermonkey adobe flash player popular browser plug-in uses nss in linux version adwatch content management system uses
xul and xpcom aicpcu/iia exam app exam delivery software aliwal geocoder geocoding & data on a map amarok
xul remote remote control for amarok music player ample sdk javascript gui-framework aol instant messenger im client uses nss apache web server doesn't use nss by default, but can be configured to use ns...
...s with mod_nss ssl module apicawatch site performance monitoring tool uses firefox as part of its monitoring package astyle css editor editing tool atmail webmail client aviva for java mainframe connectivity product uses mozilla rhino babelgum internet tv service basilisk pre-servo
xul-based web browser uses most of the firefox 55 source code batik java-based toolkit uses mozilla rhino bitbox security focused browser seemingly based on firefox blackbird browser for african american community bluegriffon wysiwyg editor next generation version of composer buzzbird twitter client built on
xulrunner camino browser 2...
... celtx media tool cenzic hailstorm vulnerability assessment and management tool uses gecko chatzilla irc client standalone version (
xulrunner) chromium and google chrome web browser uses mozilla nss and npapi libraries chromeless browser with html-based interface classilla mozilla browser for mac os 9 clines a clone of color lines (game) standalone version cloud web operating system cloud browse iphone/ipad/ipod touch browser seems to be firefox running remotely on servers that people access through device conkeror keyboard-oriented browser convertigo enterprise mashup server server t...
...And 21 more matches
Gecko info for Windows accessibility vendors
xul: extensible user-interface language the xml-based language used by firefox and mozilla to develop the ui.
... k-meleon: a light, ultra-fast and more advanced (fully configurable) gecko-based web browser available on the windows platform
xul-based clients (support msaa)
xul-based clients make full use of the gecko architecture, not only for html content, as well as for menus, dialogs and the entire user interface via an xml language called
xul (extensible user-interface language).
... event_menupopupstart and event_menupopupend are fired when
xul menus are opened or closed.
...And 21 more matches
DOM Inspector internals - Firefox Developer Tools
the one you are likely to be most familiar with is its inspector.
xul-based primary ui.
...initially, we will begin by focusing on inspector.
xul and its entry point, and then expand our focus later to explain how these other inspectors differ.
...this separation allows for viewers to be self-contained, with a viewer's
xul defined in its own document and loaded in its own scope, without fear of collisions in the
xul, css, or js.
...And 19 more matches
Creating a Window - Archive of obsolete content
first, however, we should look at the basic syntax of a
xul file.
... creating a
xul file an
xul file can be given any name but it really should have a .
xul extension.
... the simplest
xul file has the following structure: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <!-- other elements go here --> </window> this window will not do anything since it doesn't contain any ui elements.
...And 18 more matches
Anonymous Content - Archive of obsolete content
the
xul file only needs to specify the outer element while the inner elements are described in the xbl.
...declaring scrollbar example the example below shows how a scrollbar might be declared (it has been simplified a bit from the real thing): <bindings xmlns="http://www.mozilla.org/xbl" xmlns:
xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <binding id="scrollbarbinding"> <content> <
xul:scrollbarbutton type="decrement"/> <
xul:slider flex="1"> <
xul:thumb/> </
xul:slider> <
xul:scrollbarbutton type="increment"/> </content> </binding> </bindings> this file contains a single binding, declared with the binding element.
...the result of using the above binding is that the line of
xul below will be expanded as follows, assuming that the scrollbar is bound to the xbl above: <scrollbar/> expands to: <scrollbar> <
xul:scrollbarbutton type="decrement"/> <
xul:slider flex="1"> <
xul:thumb/> </
xul:slider> <
xul:scrollbarbutton type="increment"/> </scrollbar> the elements within the content tag are added to the scroll bar anonymously.
...And 17 more matches
Adding Style Sheets - Archive of obsolete content
xul uses css (cascading style sheets) to customize elements.
...it was originally designed for html elements but can be applied to
xul elements also, or to any xml for that matter.
...mozilla applies a default style sheet to each
xul window.
...And 16 more matches
tabs/utils - Archive of obsolete content
functions for working with
xul tabs and the
xul tabbrowser object.
... parameters tab : tab a
xul tab element to activate.
... parameters tab : tab a
xul tab element.
...And 14 more matches
Adding Events and Commands - Archive of obsolete content
window.addeventlistener( "load", function() {
xulschoolchrome.browseroverlay.init(); }, false); you can do something similar with the onunload event, to do any cleanup you may need.
... another way to attach event handlers, just like html, is to place the handler in the
xul code: <overlay id="
xulschoolhello-browser-overlay" onload="
xulschoolchrome.browseroverlay.init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> we prefer the first method because it keeps a better separation of content and behavior.
...this is one of the most important and commonly used events in
xul.
...And 14 more matches
Adding windows and dialogs - Archive of obsolete content
window.open( "chrome://
xulschoolhello/content/somewindow.
xul", "
xulschoolhello-some-window", "chrome,centerscreen"); the first argument is the url to open, the second is an id to identify the window, and the last is an optional comma-separated list of features, which describe the behavior and appearance of the window.
...you should always include it when opening a
xul window or dialog.
... let somevalue = 2; let returnvalue = { accepted : false , result : "" }; window.opendialog( "chrome://
xulschoolhello/content/somedialog.
xul", "
xulschoolhello-some-dialog", "chrome,centerscreen", somevalue, returnvalue); // you can send as many extra parameters as you need.
...And 14 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
a:package:custombutton" chrome:displayname="custom button" chrome:description="my custom toolbar button" chrome:author="my name" chrome:name="custombutton" chrome:localeversion="1.8" chrome:skinversion="1.5" chrome:extension="true"/> <rdf:seq about="urn:mozilla:overlays"> <!-- browser --> <rdf:li> <rdf:seq about="chrome://navigator/content/navigator.
xul"> <rdf:li>chrome://custombutton/content/button.
xul</rdf:li> </rdf:seq> </rdf:li> <!-- address book --> <rdf:li> <rdf:seq about="chrome://messenger/content/addressbook/addressbook.
xul"> <rdf:li>chrome://custombutton/content/button.
xul</rdf:li> </rdf:seq> </rdf:li> <!-- message --> <rdf:li> <rdf:seq about="chrome://messenger/content/...
...messagewindow.
xul"> <rdf:li>chrome://custombutton/content/button.
xul</rdf:li> </rdf:seq> </rdf:li> <!-- message compose --> <rdf:li> <rdf:seq about="chrome://messenger/content/messengercompose/messengercompose.
xul"> <rdf:li>chrome://custombutton/content/button.
xul</rdf:li> </rdf:seq> </rdf:li> <!-- mail --> <rdf:li> <rdf:seq about="chrome://messenger/content/messenger.
xul"> <rdf:li>chrome://custombutton/content/button.
xul</rdf:li> </rdf:seq> </rdf:li> <!-- composer --> <rdf:li> <rdf:seq about="chrome://editor/content/editor.
xul"> <rdf:li>chrome://custombutton/content/button.
xul</rdf:li> </rdf:seq> </rdf:li> <!-- chat --> <rdf:li> <rdf:seq about="chrome://chatzill...
...a/content/chatzilla.
xul"> <rdf:li>chrome://custombutton/content/button.
xul</rdf:li> </rdf:seq> </rdf:li> <!-- calendar --> <rdf:li> <rdf:seq about="chrome://calendar/content/calendar.
xul"> <rdf:li>chrome://custombutton/content/button.
xul</rdf:li> </rdf:seq> </rdf:li> </rdf:seq> </rdf:rdf> optionally customize the file by changing the displayname, description and author attributes.
...And 14 more matches
Adding HTML Elements - Archive of obsolete content
adding html elements to a window in addition to all of the
xul elements that are available, you can also add html elements directly within a
xul file.
... you can actually use any html element in a
xul file, meaning that java applets and tables can be placed in a window.
... you should avoid using html elements in
xul files if you can.
...And 14 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
well,
xul overlays and windows, jsm files, chrome & resource mappings with localization, default preferences, but no xpcom components of your own.
... step 2a: load your jsm from chrome:// now with that preface out of the way, this part is easy: drop support for firefox 3.x if you haven't already, move your jsm files to wherever you've got your chrome mapping to for your
xul overlay and/or windows, import your files from that new chrome mapped path instead of the old resource one, and remove your "resource" line from your chrome.manifest file.
... step 6: no more
xul overlays ok, now we're getting into some more drastic changes.
...And 13 more matches
Adding sidebars - Archive of obsolete content
<menupopup id="viewsidebarmenu"> <menuitem id="
xulschoolhello-sidebar" label="&
xulschoolhello.sidebar.title;" accesskey="&
xulschoolhello.sidebar.accesskey;" type="checkbox" autocheck="false" group="sidebar" sidebarurl="chrome://
xulschoolhello/content/sidebar.
xul" sidebartitle="&
xulschoolhello.sidebar.title;" oncommand="togglesidebar('
xulschoolhello-sidebar');" /> </menupopup> the example in the mdc page includes a short...
... the
xul page for the sidebar can hold any content you want and it's no different from other
xul windows or overlays.
... one minor difference is that the
xul sidebar should be defined using the «
xul reference « root element instead of window or dialog.
...And 13 more matches
Tabbed browser - Archive of obsolete content
within the firefox browser are tabs and inside each tab is a browser, both in the common sense of a web page browser and the
xul sense of a browser element.
... furthermore another meaning of 'browser' in this document and in some firefox source is "the tabbrowser element" in a firefox
xul window.
... getting access to the browser from main window code running in firefox's global chromewindow, common for extensions that overlay into browser.
xul, can access the tabbrowser element using the global variable gbrowser.
...And 13 more matches
Making it into a static overlay - Archive of obsolete content
because our extension modifies an existing file in the mozilla distribution, before we package it up we need to separate the modifications into a different file and add them back in at run time via a dynamic
xul overlay.
... a
xul overlay is a
xul file containing elements to be inserted into another
xul file when the other
xul file is rendered into an application interface.
... static overlays are added to a
xul file via a reference at the top of the file (much like stylesheets and javascript scripts).
...And 13 more matches
Localization - Archive of obsolete content
xul and xml provide entities which are a convenient way of allowing localization.
...you would normally have one dtd file (with an extension .dtd) per
xul file.
...typically, you will have one dtd file for each
xul file, usually with the same filename except with a .dtd extension.
...And 13 more matches
CustomizableUI.jsm
there are three main types of widgets: 'legacy'
xul widgets, which are the way customizableui represents widgets whose dom representation is present (or overlaid) into a window; api-style widgets, which are the new widgets customizableui can create and manage for you.
... 'special' widgets: these are the representations of
xul <toolbarseparator>, <toolbarspring> and <toolbarspacer> elements.
... ensurewidgetplacedinwindow() ensure a
xul-based widget created in a window after areas were initialized moves to its correct position.
...And 13 more matches
Main Windows
as such, i've always thought it would be nice to have a list of what
xul, js, or other files are that are here, what they do, and where they overlay at different points within the client.
... messenger.
xul the base mail window that you see when you first open thunderbird is messenger.
xul: messenger.
xul itself doesn’t contain a lot.
...the rest is loaded from overlays: mailwindowoverlay.
xul this is the red sections shown in the interface above (where?), including the toolbars, notification bars, and the status bar, but also includes most of the commands, keysets, and context menus of thunderbird, along with a whole lot of javascript.
...And 13 more matches
Manifest Files - Archive of obsolete content
« previousnext » in this section, we'll see how to put chrome and
xul files into a package and create the manifest files for them.
... packages a package is a set of
xul files and scripts that define the functionality of a user interface.
... if you just want to try testing privileged
xul code in the firefox browser, you can do this easily by just using a manifest with only one line in it: create a new directory somewhere.
...And 12 more matches
Event reference
ussdreceived firefox os specific a new ussd message is received mscontentzoom microsoft specific msmanipulationstatechanged microsoft specific mspointerhover microsoft specific mozilla-specific events note: these events are never exposed to web content and can only be used in a
xul chrome content context.
...
xul events event name event type specification fired when...
... broadcast
xul an observer noticed a change to the attributes of a watched broadcaster.
...And 12 more matches
Index of archived content - Archive of obsolete content
classes and inheritance content processes getting started modules private properties firefox compatibility module structure of the sdk porting the library detector program id sdk api lifecycle sdk and
xul comparison testing the add-on sdk two types of scripts working with events
xul migration guide high-level apis addon-page base64 clipboard context-menu hotkeys indexed-db l10n ...
...istory platform/xpcom preferences/event-target preferences/service remote/child remote/parent stylesheet/style stylesheet/utils system/child_process system/environment system/events system/runtime system/unload system/
xul-app tabs/utils test/assert test/harness test/httpd test/runner test/utils ui/button/action ui/button/toggle ui/frame ui/id ui/sidebar ui/toolbar util/array util/collection util/deprecate ...
... canvas code snippets cookies customizing the download progress bar delayed execution dialogs and prompts downloading files drag & drop embedding svg examples and demos from articles file i/o finding window handles forms related code snippets html in
xul for rich tooltips html to dom isdefaultnamespace js xpcom javascript debugger service javascript timers javascript daemons management label and description lookupnamespaceuri lookupprefix miscellaneous modules ...
...And 11 more matches
Creating a Firefox sidebar extension - Archive of obsolete content
first a simple
xul page is created.
... pre-requisites this article is a quick start, it won't explain all elements of
xul, packaging and xpi's.
... it's preferable you have some basic knowledge of how
xul works and how firefox handles extensions.
...And 11 more matches
Complete - Archive of obsolete content
install.js installation script for seamonkey chrome directory containing the extension code chrome/allcustom.jar the extension jar defaults/preferences directory containing a preferences file inside the jar there are three directories: content
xul, javascript and other content that does not depend on the locale or theme locale files for each locale skin files for each theme version checks firefox etc.
...these are in the files button.
xul and button.js.
...
xul and javascript each have mechanisms for loading text strings from the correct locale directory.
...And 11 more matches
Box Objects - Archive of obsolete content
« previousnext » this section describes the box object, which holds display and layout related information about a
xul box as well as some details about
xul layout.
...a
xul element, for example, will have a
xulelement type of content node.
...unless you change the style for an element, most
xul elements will usually use the box layout object or one of its subtypes.
...And 11 more matches
Archived Mozilla and build documentation - Archive of obsolete content
there is, however, no practical obstacle to the interface being implemented by any javascript object associated with a group of dom nodes, even non-anonymous
xul nodes.
... embedding faq embedding mozilla in a java application using javaxpcom
xulrunner ships with the javaxpcom component, which allows java code to interact with xpcom objects.
...liveconnect gives your extension's javascript code (linked from or contained in
xul code) access to 2 objects: java and packages (note that per this thread, although the new documentation for the liveconnect reimplementation states that these globals will be deprecated (in the context of applets), "firefox and the java plug-in will continue to support the global java/packages keywords, in particular in the context of firefox extensions.").
...And 11 more matches
Localizing an extension - Archive of obsolete content
performing a few simple steps makes your extension much easier to localize into various languages without having to edit the
xul or javascript files themselves.
...download the sample localizing strings in
xul files create the needed locale files each
xul file that comprises the user interface for your extension should have a locale file in its locale directory.
... each locale file maps entity names referenced in the
xul files to the strings themselves.
...And 10 more matches
Template Builder Interface - Archive of obsolete content
« previousnext » when inserting an element into a
xul document, the element is checked to see if it has a datasources attribute.
...both types of builders implement the nsi
xultemplatebuilder interface, while the tree builder also implements the nsi
xultreebuilder interface.
...templates can only be used in
xul documents, however, there is no requirement that the templates generate
xul elements.
...And 10 more matches
Adding Event Handlers - Archive of obsolete content
you can use the script element to include scripts in
xul files.
... you can embed the script code directly in the
xul file in between the opening and closing script tags but it is much better to include code in a separate file as the
xul window will load slightly faster.
...although it does not matter what the script file is called, usually it would be the same as the
xul file with a .js extension.
...And 10 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
<overlay id="
xulschoolhello-browser-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <toolbarpalette id="browsertoolbarpalette"> <toolbarbutton id="
xulschoolhello-hello-world-button" class="toolbarbutton-1 chromeclass-toolbar-additional" label="&
xulschoolhello.helloworld.label;" tooltiptext="&
xulschoolhello.helloworld.tooltip;" oncommand="
xulschoolchr...
... setting the image for a toolbar button is done with css: #
xulschoolhello-hello-world-button { list-style-image: url("chrome://
xulschoolhello/skin/hello-world.png"); } it's not really that simple to set the image for a toolbar button, because we need to consider the appearance of the button on different systems, and also consider the different button states, but we'll get into that further ahead.
...the way to include the file in the manifest is to add this line: style chrome://global/content/customizetoolbar.
xul chrome://
xulschoolhello/skin/toolbar.css if you are using xbl bindings (explained way ahead) for your toolbar items, you'll have to include the css files for those as well, each in a new line like the one above.
...And 9 more matches
Handling Preferences - Archive of obsolete content
this
xul page lists all the preferences defined in the firefox installation, allowing you to change them as you please.
...there are a couple of additions in the makefiles, to include the preference file
xulschoolhello.js.
...pref("extensions.
xulschoolhello.message.count", 0); this defines a preference we'll use to keep track of the amount of times we have displayed a greeting message to the user.
...And 9 more matches
Simple Example - Archive of obsolete content
<?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <rdf:seq rdf:about="http://www.
xulplanet.com/rdf/myphotos"> <rdf:li rdf:resource="http://www.
xulplanet.com/ndeakin/images/t/palace.jpg"/> <rdf:li rdf:resource="http://www.
xulplanet.com/ndeakin/images/t/canal.jpg"/> <rdf:li rdf:resource="http://www.
xulplanet.com/ndeakin/images/t/obelisk.jpg"/> </rdf:seq> <rdf:description rdf:about="http://www.
xulplanet.com/ndeakin/images/t/palace.jpg" dc:title="palace from above"/> ...
... <rdf:description rdf:about="http://www.
xulplanet.com/ndeakin/images/t/canal.jpg" dc:title="canal"/> <rdf:description rdf:about="http://www.
xulplanet.com/ndeakin/images/t/obelisk.jpg" dc:title="obelisk"/> </rdf:rdf> in this example, we have three images, which can be identified by urls.
...the container, an rdf seq, has the uri 'http://www.
xulplanet.com/rdf/myphotos'.
...And 9 more matches
Advanced Rules - Archive of obsolete content
let's say you have a list of cities described in the following rdf/xml fragment: <rdf:seq about="http://www.
xulplanet.com/rdf/weather/cities"> <rdf:li resource="http://www.
xulplanet.com/rdf/weather/city/paris"/> <rdf:li resource="http://www.
xulplanet.com/rdf/weather/city/manchester"/> <rdf:li resource="http://www.
xulplanet.com/rdf/weather/city/melbourne"/> <rdf:li resource="http://www.
xulplanet.com/rdf/weather/city/kiev"/> </rdf:seq> <rdf:description about="http://www.
xulplanet.com/rdf/weather/cit...
...to do this, use the member element as in the following: <tree id="citiestree" datasources="weather.rdf" ref="http://www.
xulplanet.com/rdf/weather/cities"> <template> <rule> <conditions> <content uri="?list"/> <member container="?list" child="?city"/> </conditions> <rule> <template> </tree> the template builder starts by grabbing the value of the ref attribute, which in this case is http://www.
xulplanet.com/rdf/weather/cities.
...thus the parent will be the value of the list variable, which has been set to the root resource 'http://www.
xulplanet.com/rdf/weather/cities'.
...And 9 more matches
Theme changes in Firefox 2 - Archive of obsolete content
the table lists both the changed
xul file and the theme's corresponding css file that you might need to update.
... filename css file details browser/base/searchdialog.
xul browser/base/content/searchdialog.css removed from firefox 2.
... feeds/addfeedreader.
xul feeds/addfeedreader.css new file that presents ui for adding a new feed reader.
...And 9 more matches
nsIAppShellService
inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by: @mozilla.org/appshell/appshellservice;1 as a service: var appshellservice = components.classes["@mozilla.org/appshell/appshellservice;1"] .getservice(components.interfaces.nsiappshellservice); method overview void closetoplevelwindow(in nsi
xulwindow awindow); obsolete since gecko 1.8 void createhiddenwindow(in nsiappshell aappshell); native code only!
... boolean createstartupstate(in long awindowwidth, in long awindowheight); obsolete since gecko 1.8 nsi
xulwindow createtoplevelwindow(in nsi
xulwindow aparent, in nsiuri aurl, in pruint32 achromemask, in long ainitialwidth, in long ainitialheight, in nsiappshell aappshell); nsiwebnav createwindowlessbrowser (in bool aischrome) void destroyhiddenwindow(); void doprofilestartup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.8 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.8 void enterlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void exitlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void gethiddenwindowandjscontext(out n...
... void hidesplashscreen(); obsolete since gecko 1.8 void initialize(in nsicmdlineservice acmdlineservice, in nsisupports nativeappsupportorsplashscreen); obsolete since gecko 1.8 void quit(in pruint32 aferocity); obsolete since gecko 1.8 void registertoplevelwindow(in nsi
xulwindow awindow); void run(); obsolete since gecko 1.8 void toplevelwindowismodal(in nsi
xulwindow awindow, in boolean amodal); obsolete since gecko 1.9.1 void unregistertoplevelwindow(in nsi
xulwindow awindow); note: prior to gecko 8.0, all references to nsidomwindow used in this interface were nsidomwindowinternal.
...And 9 more matches
Introduction - Archive of obsolete content
next » welcome to the
xul school tutorial!
...we have poured years of
xul experience into it, providing many solutions for problems extension developers commonly run into.
...
xul school was created by appcoast (formerly glaxstar), one of the few companies dedicated to building high-quality firefox extensions.
...And 8 more matches
Observer Notifications - Archive of obsolete content
this example code shows you what an implementation of the nsiobserver interface looks like: let testobserver = { observe : function(asubject, atopic, adata) { if (atopic == "
xulschoolhello-test-topic") { window.alert("data received: " + adata); } } } in order for this observer to work, you need to use the observer service that provides methods for you to add, remove, notify and enumerate observers.
... getservice(components.interfaces.nsiobserverservice); observerservice.addobserver(testobserver, "
xulschoolhello-test-topic", false); you should come up with a notification topic that is unique so you know it will not conflict with firefox or other extensions topics.
... observerservice.removeobserver(testobserver, "
xulschoolhello-test-topic"); after you have registered some observers to listen to a notification topic, you can then use the notifyobservers method to send a notification to all of them.
...And 8 more matches
XPCOM Objects - Archive of obsolete content
this lower layer is called
xulrunner, and it is a very powerful platform, providing a very robust development base for web-enabled, cross-platform applications.
... the fact that it allows to easily create os-independent applications is a big selling point for
xulrunner.
... xpcom is the way in which the two layers (
xulrunner and chrome) communicate.
...And 8 more matches
The Chrome URL - Archive of obsolete content
« previousnext » the following section will describe how to refer to
xul documents and other chrome files.
... the chrome url
xul files can be referenced with a regular http url (or any type of url) just like html files.
...the basic syntax of a chrome url is as follows: chrome://<package name>/<part>/<file.
xul> the text <package name> is the package name, such as messenger or editor.
...And 8 more matches
XForms Input Element - Archive of obsolete content
representations the xforms input element can be represented by the following widgets for the spcified data types (or types derived from these data types): text field - the default widget when no type is specified or the data is of type xsd:string (xhtml/
xul) checkbox - used for xsd:boolean instance data.
... (xhtml/
xul) datepicker - used to represent data of type xsd:date (xhtml/
xul) calendar - used to represent data of type xsd:date when appearance attribute also has the value 'full' (xhtml/
xul) month list - used to represent data of type xsd:gmonth (xhtml only) days list - used to represent data of type xsd:gday (xhtml only) number field - used to represent data of numeric type (fx 3.0 only,
xul only) more detail about each of these widgets follows below.
...allows for free-form data entry (xhtml/
xul).
...And 8 more matches
Embedding the editor
composer embedded in a
xul application developers need to embed composer widgets in their
xul applications, by using the <editor> tag as we do today.
...the composer chrome (toolbars etc) may be implemented by the embedder using native widgets, or using some amount of
xul.
...(the current nseditorshell makes assumptions about the hosting
xul document, which need to be broken.) composer embedded in a web page (<htmlarea>) ie 5 supports the <htmlarea> element; if mozilla is to support something similar, editor needs to be embeddable to the extent that this can be done.
...And 8 more matches
Setting Up a Development Environment - Archive of obsolete content
most
xul tools and plugins you'll find online are merely templates that generate the folder structure for the project, and that's not much help.
...it's based on the mozilla
xulrunner platform, so it has support for some of the particularities in firefox extension development.
... komodo edit has automatic completion for
xul tags and attributes, and it supports mozilla's css extensions (css values and properties beginning with "-moz").
...And 7 more matches
Source code directories overview - Archive of obsolete content
tests contains c harnesses, html or
xul that exercise this module.
... editor contains c interfaces, c code and
xul for the embeddable editor component which can edit both plain text and html.
... extensions contains c interfaces, c code,
xul and javascript code for various add-ins that are related to browsing.
...And 7 more matches
Actions - Archive of obsolete content
« previousnext » the content to generate in a template is specified using the <
xul:action> element which should either be the next sibling of the <
xul:query> element (if no rules need be specified) or be a direct child of a <
xul:rule> element.
...<vbox datasources="http://www.
xulplanet.com/ds/sample.rdf" ref="http://www.
xulplanet.com/rdf/a"> <template> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.
xulplanet.com/rdf/relateditem" object="?relateditem"/> </query> <action> <button uri="?relateditem" label="?relateditem"/> </action> </template> </vbox> in this example, we omit the <
xul:rule> element around the <
xul:action> as it is optional when we want to generate content unconditionally.
... instead, the action element is placed directly inside the <
xul:template> element after the query is defined.
...And 7 more matches
RDF Query Syntax - Archive of obsolete content
<vbox datasources="http://www.
xulplanet.com/ds/sample.rdf" ref="http://www.
xulplanet.com/rdf/a"> <template> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.
xulplanet.com/rdf/relateditem" object="?relateditem"/> </query> <rule> ...
...the seed result will be created like this: (?start = http://www.
xulplanet.com/rdf/a) the variable ?start is determined from the tag's 'uri' attribute.
...the value of ?start is set to 'http://www.
xulplanet.com/rdf/a'.
...And 7 more matches
Accesskey display rules - Archive of obsolete content
each controls of
xul can have an accesskey which is specified by accesskey attribute or accesskey property (see accesskey attribute document for the detail).
...
xul elements display their accesskeys in their label automatically if it's necessary.
...
xul elements don't display any accesskeys on mac
xul elements don't display any accesskeys on mac.
...And 7 more matches
Introduction to XBL - Archive of obsolete content
« previousnext »
xul has a sister language, xbl (extensible bindings language).
... this language is used for declaring the behavior of
xul widgets.
... bindings you can use
xul to define the layout of a user interface for an application.
...And 7 more matches
mozilla.dev.platform FAQ - Archive of obsolete content
faq for questions asked on mozilla.dev.platform
xulrunner q:
xulrunner on mac os x a: instead of using /path/to/
xulrunner-bin.ini, applications on a mac must be in an application bundle (foo.app).
... then unpack the
xul app into the mac structure with
xulrunner -install-app q: can you build
xulrunner with newer (>1.5) features, such as storage?
... a:
xulrunner trunk and 1.8 (but not 1.8.0) build storage by default, and anything can be built with storage if you put in you <tt>mozconfig --enable-storage</tt> q: program received signal exc_bad_instruction, illegal instruction/operand.
...And 7 more matches
Working with windows in chrome code
this article describes working with multiple windows in mozilla chrome code (
xul applications and extensions).
... opening windows from a <script> in a window or an overlay to open a new window, we usually use a window.open or window.opendialog dom call, like this: var win = window.open("chrome://myextension/content/about.
xul", "aboutmyextension", "chrome,centerscreen"); the first parameter to window.open is the uri of the
xul file that describes the window and its contents.
...this is different from the user-visible window title, which is specified using
xul.
...And 7 more matches
Dialogs and Prompts - Archive of obsolete content
describing dialog windows dialogs in mozilla whenever you want to create a dialog in your application, use <dialog> (instead of usual <window>) as root element in the
xul file.
... simple dialog code the following
xul code defines a simple dialog with two buttons, ok and cancel (buttons="accept,cancel" attribute on dialog).
... <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" id="..." title="..." buttons="accept,cancel" ondialogaccept="return onaccept();" ondialogcancel="return oncancel();"> <script src="chrome://..."/> <!-- content --> </dialog> you need to implement onaccept and oncancel functions in your script.
...And 6 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
listing 1: calling xpcom functions using xpconnect <?xml version="1.0" encoding="utf-8"?> <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <script type="application/javascript"><![cdata[ var ioservice = components.classes['@mozilla.org/network/io-service;1'] .getservice(components.interfaces.nsiioservice); alert(ioservice); ]]></script> </page> calling xpconnect using local files try saving the contents of listing 1 as the file test.
xul, somewhere on your desktop, and drag and drop it into firefox t...
...this is a by-product of the fact that test.
xul currently doesn’t have privileges.
... permit by dialog try adding the contents of listing 2 to test.
xul, before the line var ioservice = …, and re-open it in firefox.
...And 6 more matches
Connecting to Remote Content - Archive of obsolete content
using xslt xslt (extensible stylesheet language transformations) is another tool used to manipulate xml documents and transform them into other forms of text output, such as html,
xul, and so on.
... we can not cover all transformations to various output formats, so we'll just look into converting an xml document to
xul.
...this template will transform the xml you receive (in our case, the example xml document above) and convert it into
xul.
...And 6 more matches
JavaScript Object Management - Archive of obsolete content
namespace declaration is best located in a file of its own, so that you have this one js file that should be included in all of your
xul files.
... you usually need only one js file to control a
xul window, since the code required is normally not that much.
...you can include as many scripts in a
xul window as you need.
...And 6 more matches
Creating a status bar extension - Archive of obsolete content
you can find a more up-to-date tutorial in the
xul school tutorial the essentials of an extension.
... many of the concepts introduced here apply to any
xul-based application; however, to keep from getting completely overwhelmed, we're going to focus specifically on firefox.
...although this sample extension only works in firefox, it's entirely possible to create extensions that work in multiple
xul-based applications.
...And 6 more matches
Namespaces - Archive of obsolete content
although there's nothing preventing someone else from using the namespace http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul, it's fairly unlikely anyone would choose that accidentally.
... even if they did accidentally choose it, they may not define the same elements as
xul anyway (e.g., <textbox/>) in their schema/dtd.
...for example, <
xul:textbox/> uses a namespace named "
xul" and a local name "textbox".
...And 6 more matches
Additional Navigation - Archive of obsolete content
to look closer, here is the data network after only the member has been evaluated: (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/palace.jpg) (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/canal.jpg) (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/obselisk.jpg) when evaluating the triple, the template builder will iterate over the three potent...
...for the first result, the value of the ?photo variable 'http://www.
xulplanet.com/ndeakin/images/t/palace.jpg' will be used as the subject, the predicate will be 'http://purl.org/dc/elements/1.1/title', and the object will be 'canal'.
...the resulting data will look like the following: (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/canal.jpg) here is the example.
...And 6 more matches
Content Panels - Archive of obsolete content
« previousnext » in this section, we'll look at how to add panels that can display html pages or other
xul files.
...note that
xul does have a wizard element which may be used to create wizard interfaces.
...this url may point to any kind of file, although it will usually point to an html file or another
xul file.
...And 6 more matches
tree - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container which can be used to hold a tabular or hierarchical set of rows of elements.
... rdf tree nsitreeview, nsi
xultreebuilder no this tree is generated from an rdf datasource.
... rdf content tree nsitreeview, nsi
xultreebuilder, nsitreecontentview yes this tree is generated from an rdf datasource.
...And 6 more matches
window - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] describes the structure of a top-level window.
... it is the root node of a
xul document.
... more information is available in the
xul tutorial.
...And 6 more matches
MacFAQ - Archive of obsolete content
(note this document has not been reviewed for accuracy or completeness.) special build notes enable lib
xul.
... in your .mozconfig for custom builds of
xulrunner, add --enable-lib
xul.
... if you've completed a
xulrunner build, you should copy or symlink the dist/
xul.framework directory to /library/frameworks.
...And 6 more matches
Building a Theme - Archive of obsolete content
styling the browser's ui with css firefox's user interface is written in
xul and javascript.
...
xul is an xml grammar that provides user interface widgets like buttons, menus, toolbars, trees, etc.
...these
xul elements are styled using css.
...And 6 more matches
Displaying Places information using views
places provides the following built-in views: tree menu toolbar instantiating the three built-in views are simply standard
xul elements with a special type attribute whose value is "places".
... every
xul document containing a built-in view must import the stylesheet browser/components/places/content/places.css and overlay the file browser/components/places/content/placesoverlay.
xul: <?xml-stylesheet href="chrome://browser/content/places/places.css" ?> <?
xul-overlay href="chrome://browser/content/places/placesoverlay.
xul" ?> it's this stylesheet that binds elements with the special type attribute to one of the views.
... you may specify the attribute directly in the
xul or set its corresponding property via javascript.
...And 6 more matches
Gecko SDK
the gecko sdk, also known as the
xulrunner sdk, is a set of xpidl files, headers and tools to develop xpcom components which can then in turn e.g.
... be accessed from
xul using javascript.
... do not confuse the gecko/
xulrunner sdk with
xulrunner itself.
...And 6 more matches
XPCOM glue
extension or
xulrunner application components, should use the dependent glue.
... internal linkage will be unavailable to extension authors in
xulrunner 1.9 (firefox 3) because the nonfrozen symbols will not be exported from lib
xul.
...glue windows /fi "xpcom-config.h" linux -include "xpcom-config.h" linker flags: windows for older versions of the firefox sdk: -libpath:c:/path/to/sdk/lib xpcomglue_s.lib xpcom.lib nspr4.lib for recent versions of the firefox sdk (at least version 42, but possibly earlier versions as well): -libpath:c/path/to/sdk/lib xpcomglue_s.lib
xul.lib nss3.lib mozcrt.lib -libpath:c:/path/to/sdk/lib xpcomglue.lib mac -l/path/to/sdk/lib -l/path/to/sdk/bin -wl,-executable-path,/path/to/sdk/bin -lxpcomglue_s -lxpcom -lnspr4 when building against a
xulrunner derived sdk, use: -l/path/to/sdk/lib -l/path/to/
xulrunner-bin -wl,-executable_path,/path/to/
xulrunner-bin -lxpcomglue_s -lxpcom -lnspr4 where '
xulrunn...
...And 6 more matches
Mozilla
gecko's function is to render web content, such as html, css,
xul, javascript, and render it on the user's screen or print it.
... in
xul-based applications gecko also renders the application's user interface.
...(to get a stacktrace for thunderbird or some other product, substitute the product name where ever you see firefox in this instructions.) how to implement a custom autocomplete search component the
xul textbox element supports an autocomplete mechanism that is used to create a textbox with a popup containing a list of possible completions for what the user has started to type.
...And 6 more matches
Inline options - Archive of obsolete content
options file the
xul allowed for the inline options is limited to a few new tags.
... here is an example of an options.
xul file: <?xml version="1.0"?> <!doctype mydialog system "chrome://myaddon/locale/mydialog.dtd"> <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <setting type="bool" pref="extensions.myaddon.bool" title="boolean" desc="stored as a boolean preference" /> </vbox> note that it's limited to <setting> tags.
...so if you would like to do some changes to the
xul on the inline options page you can do so.
...And 5 more matches
Adding menus and submenus - Archive of obsolete content
if your extension requires custom
xul windows, you may also need to have menus on those windows.
... the toolbox should be positioned near the top of the
xul document, and the code should be similar to this: <toolbox> <menubar id="
xulschoolhello-menubar"> <menu id="
xulschoolhello-greeting-menu" label="&
xulschoolhello.greeting.label;"> <menupopup> <menuitem label="&
xulschoolhello.greet.short.label;" oncommand="
xulschoolchrome.greetingdialog.greetingshort(event);" /> <menuitem label="&
xulschoolhello.greet.medium.la...
...bel;" oncommand="
xulschoolchrome.greetingdialog.greetingmedium(event);" /> <menuitem label="&
xulschoolhello.greet.long.label;" oncommand="
xulschoolchrome.greetingdialog.greetinglong(event);" /> <menuseparator /> <menuitem label="&
xulschoolhello.greet.custom.label;" oncommand="
xulschoolchrome.greetingdialog.greetingcustom(event);" /> </menupopup> </menu> </menubar> </toolbox> this code displays a simple menu with options for 3 different types of greetings, a menuseparator, and finally an option to show a custom greeting.
...And 5 more matches
Finding the file to modify - Archive of obsolete content
the structure layer consists of
xul files.
...
xul, which is short for xml-based user interface language (and is pronounced like "zool"), is an xml-based language specifically designed for describing application interfaces.
... each window and dialog box in mozilla is defined by a single
xul file (in some cases other
xul files called overlays contribute portions of another window's structure).
...And 5 more matches
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
xulrunner ships with the javaxpcom component, which allows java code to interact with xpcom objects.
... prerequisites java 1.4.2 or newer
xulrunner 1.8.0.1 or newer embedding in order to embed mozilla in your java application, you will need to add the library mozillainterfaces.jar (located in
xulrunner/sdk/lib folder) to your classpath.
...first, the java application must find a suitable
xulrunner installation: mozilla mozilla = mozilla.getinstance(); greversionrange[] range = new greversionrange[1]; range[0] = new greversionrange("1.8.0", true, "1.9", false); // work with trunk nightly version 1.9a1 ^^ try { file grepath = mozilla.getgrepathwithproperties(range, null); locationprovider locprovider = new locationprovider(grepath); mozilla.initembedding(grepath, grepath, locprovider); } catch (filenotfoundexception e) { // this exception is thrown if gregrepathwithproperties cannot find a gre } catch (xpcomexception e) { // this ex...
...And 5 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
editor's note: this article should be rewritten to describe why use
xulrunner to create your own application.
... related:
xulrunner:what
xulrunner provides,
xulrunner hall of fame ui in mozilla mozilla's philosophy of using "the right tool for the right job" is manifested most prominently in the design of the user interface.
... we provide an xml-based language called
xul for defining the user interface of your application.
...And 5 more matches
Creating XPI Installer Modules - Archive of obsolete content
xul, javascript, or css files) in the chrome subdirectories and editing them with a text editor has been replaced by something a lot of developers find more confusing and esoteric.
...the barley package the barley package is a simple
xul window with a couple of buttons and an image element.
...the chrome:// url pointer corresponds to the directory mozilla/bin/chrome/barley/content, where the main
xul file and the other resources live once they are installed.
...And 5 more matches
Introduction - Archive of obsolete content
next » a
xul template is a means of producing a block of content for each result from some query or query-like operation.
...effectively,
xul templates are the
xul way of doing databinding.
...in
xul, the datasource is specified by placing the datasources attribute on an element.
...And 5 more matches
Custom toolbar button - Archive of obsolete content
copy the following content, and paste it into the new file: content custombutton chrome/ style chrome://global/content/customizetoolbar.
xul chrome://custombutton/content/button.css # firefox overlay chrome://browser/content/browser.
xul chrome://custombutton/content/button.
xul # thunderbird mail overlay chrome://messenger/content/messenger.
xul chrome://custombutton/content/button.
xul # thunderbird compose overlay chrome://messenger/content/messengercompose/messengercompose.
xul chrome://custombutton/content/button.
xul # thunderbird...
... address book overlay chrome://messenger/content/addressbook/addressbook.
xul chrome://custombutton/content/button.
xul # sunbird overlay chrome://calendar/content/calendar.
xul chrome://custombutton/content/button.
xul optionally remove the sections for toolbars that you do not need.
...create a plain text file named button.
xul.
...And 5 more matches
button - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a button that can be pressed by the user.
... more information is available in the
xul tutorial.
...constants for the possible values for this attribute are in the nsidom
xulbuttonelement interface.
...And 5 more matches
prefwindow - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a specialized window used for preference dialogs.
... important note for
xulrunner-based applications: the preferences system - part of the toolkit - still relies on two browser.* preferences.
...this one can be safely omitted in
xulrunner-based applications but you can override the default behavior (true for mac os x and false for other platforms) setting it.
...And 5 more matches
toolbarbutton - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a button that appears on a toolbar.
...more information is available in the
xul tutorial.
...constants for the possible values for this attribute are in the nsidom
xulbuttonelement interface.
...And 5 more matches
XForms Output Element - Archive of obsolete content
to see how they work you can try an xhtml example or a
xul example.
... representations the xforms output element can be represented by the following widgets for the specified data types (or types derived from these data types): text - default representation for instance data of most types, especially static text (xhtml/
xul).
... calendar - used to represent instance data of type date (xhtml/
xul).
...And 5 more matches
Mozilla accessibility architecture
readers of this document should be familiar with interfaces, the w3c dom,
xul and the concept of a layout object tree.
... directory purpose accessible/public common interfaces shared by all toolkits accessible/public/msaa custom com interfaces that we use to extend msaa's iaccessible accessible/public/atk internal xpcom atk interfaces accessible/src/base common implementations shared by html and
xul implementations accessible/src/html/ document and html object implementations accessible/src/
xul/ user interface and
xul object implementations accessible/src/msaa/ windows implementations accessible/src/atk/ atk implementations, may eventually be used on platforms other than linux and unix acc...
...
xul elements are checked for support of the nsiaccessibleprovider interface, which can return an accessible.
...And 5 more matches
A bird's-eye view of the Mozilla framework
the mozilla xptoolkit module provides a similar set of facilities for building cross-platform ui controls implemented as xml user interface language (
xul) packages.
... a
xul package consists of a
xul description of the ui widget cascading style sheets customizing appearance javascript services implementing the ui behavior a package (also known as chrome) is really just a bundling of a set of ui widgets and associated services implementing a particular application feature.
...the nglayout engine also parses
xul ui controls into a dom tree and handles rendering of the ui.
...And 5 more matches
Embedded Dialog API
gecko can use the latter to pose dialogs built from
xul.
...
xul dialogs are part of the gecko package; they are the default dialog posing mechanism.
...however while
xul dialogs are very configurable, they will not behave and probably not look precisely like dialogs which the application builds for itself, independently of gecko.
...And 5 more matches
nsISessionStore
the api operates on top-level browser.
xul and navigator.
xul windows; see note on windows for details.
... persisttabattribute() sets the name of a tab attribute to be saved and restored for all
xul tabs.
...these windows are nsidomwindow objects that contain the tabbrowser that users see as tabs; the document in these windows is browser.
xul.
...And 5 more matches
Index
as such, i've always thought it would be nice to have a list of what
xul, js, or other files are that are here, what they do, and where they overlay at different points within the client.
...it shares many of the technologies used by mozilla firefox, including javascript, the gecko layout engine, the
xul xml user interface language and the xpcom cross-platform component object model.
...open the file called chrome.manifest that you created and add this code: 78 building a thunderbird extension 5:
xul extensions, thunderbird thunderbird's user interface is written in
xul and javascript.
...And 5 more matches
Local Storage - Archive of obsolete content
« previousnext » note: you may rather be looking for dom storage (localstorage, etc.), unless you really are doing
xul development.
...the structure could be something like this: s435l.default (your profile directory)
xulschool log.txt somedbfile.sqlite the directory service and the nsifile interface are used to create the local directory.
... let localdir = directoryservice.get("profd", ci.nsifile); localdir.append("
xulschool"); if (!localdir.exists() || !localdir.isdirectory()) { // read and write permissions to owner and group, read-only for others.
...And 4 more matches
Add-ons - Archive of obsolete content
all of these documents currently assume, however, that you are developing your extension using
xul and javascript only.
...extensions use a directory structure which can provide chrome, components, and other files to extend the functionality of an
xul program.
... firefox addons developer guide the original document is in japanese and distributed via the
xuldev.org website.
...And 4 more matches
RDF Modifications - Archive of obsolete content
for instance, an assert call looks like the following: var source = rdf.getresource("http://www.
xulplanet.com/ndeakin/images/t/obelisk.jpg"); var predicate = rdf.getresource("http://purl.org/dc/elements/1.1/description"); var target = rdf.getliteral("one of the thirty or so egyptian obelisks"); datasource.assert(source, predicate, target, true); the assert call adds a new triple to the rdf datasource.
... subject: http://www.
xulplanet.com/ndeakin/images/t/obelisk.jpg predicate: http://purl.org/dc/elements/1.1/description object: one of the thirty or so egyptian obelisks the template builder will be notified through the rdf observer mechanism of the change.
... (?photo = http://www.
xulplanet.com/ndeakin/images/t/obelisk.jpg, ?description = 'one of the thirty or so egyptian obelisks') next, the builder works its way backwards through the statements, in order to fill in the remaining variables.
...And 4 more matches
Simple Query Syntax - Archive of obsolete content
after the default query statements are evaluated, the data network will look something like this: (?1 = http://www.
xulplanet.com/rdf/myphotos, ?2 = http://www.
xulplanet.com/ndeakin/images/t/palace.jpg) (?1 = http://www.
xulplanet.com/rdf/myphotos, ?2 = http://www.
xulplanet.com/ndeakin/images/t/canal.jpg) (?1 = http://www.
xulplanet.com/rdf/myphotos, ?2 = http://www.
xulplanet.com/ndeakin/images/t/obselisk.jpg) the numbers are used here for the variable names, but they are really just randomly generated so you ca...
...there are several attributes in the example
xul content above that have values prefixed with 'rdf:'.
...for example: <label value="rdf:http://purl.org/dc/elements/1.1/title http://www.
xulplanet.com/rdf/country"/> the 'rdf:' form is really equivalent to the <binding> tag in the full syntax.
...And 4 more matches
Manipulating Lists - Archive of obsolete content
« previousnext » the
xul listbox provides a number of specialized methods.
... these three methods are also available for several other
xul elements and work in the same manner.
... in fact, these methods are part of the nsidom
xulselectcontrolelement interface so any
xul elements which implement this interface have these methods.
...And 4 more matches
XBL Attribute Inheritance - Archive of obsolete content
for example:
xul: <searchbox/> xbl: <binding id="searchbinding"> <content> <
xul:textbox/> <
xul:button label="search"/> </content> </binding> in the example, the label attribute has been placed directly on the button element.
...<
xul:textbox xbl:inherits="flex"/> <
xul:button xbl:inherits="label"/> when the content is generated, the textbox grabs the flex attribute from the searchbox and the button grabs the label attribute from the searchbox.
...<bindings xmlns:xbl="http://www.mozilla.org/xbl" xmlns:
xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <xbl:binding id="buttonbinding"> <xbl:content> <
xul:button label="ok" xbl:inherits="label"/> </xbl:content> </xbl:binding> in this example, the button inherits the label attribute, but this attribute is also given a value directly in the xbl.
...And 4 more matches
XBL Example - Archive of obsolete content
the content of the pages will be specified in the
xul file, not in xbl, but we'll need to add it inside the deck.
... example 1 : source <binding id="slideshow"> <content> <
xul:vbox flex="1"> <
xul:deck xbl:inherits="selectedindex" selectedindex="0" flex="1"> <children/> </
xul:deck> <
xul:hbox> <
xul:button xbl:inherits="label=previoustext"/> <
xul:label flex="1"/> <
xul:button xbl:inherits="label=nexttext"/> </
xul:hbox> </
xul:vbox> </content> </binding> this binding creates the slideshow structure that we want.
...the selectedindex is inherited by the deck, so we may set the initial page in the
xul.
...And 4 more matches
Chrome registration
it will typically be a
xul file, since
xul is designed for describing the contents of windows and dialogs.
... in order to inform the chrome registry of the available chrome, a text manifest is used: this manifest is "chrome.manifest" in the root of an extension, or theme, or
xulrunner application.
... override in some cases an extension or embedder may wish to override a chrome file provided by the application or
xulrunner.
...And 4 more matches
Listening to events on all tabs
void onlocationchange( nsidom
xulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, nsiuri alocation [optional] in unsigned long aflags ); parameters abrowser the browser representing the tab whose location changed.
...void onprogresschange( nsidom
xulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, print32 acurselfprogress, print32 amaxselfprogress, print32 acurtotalprogress, print32 amaxtotalprogress ); parameters abrowser the browser representing the tab for which updated progress information is being provided.
...void onsecuritychange( nsidom
xulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, unsigned long astate ); parameters abrowser the browser that fired the notification.
...And 4 more matches
How to implement a custom autocomplete search component
the
xul textbox element supports an autocomplete mechanism that is used to create a textbox with a popup containing a list of possible completions for what the user has started to type.
... a newer and slightly simplified mechanism that is used in "toolkit" applications such as firefox and
xulrunner.
... to use autocomplete with a
xul textbox, all you need to do is set some attributes: <textbox type="autocomplete" autocompletesearch="history"/> the type="autocomplete" turns on the autocomplete mechanism and the autocompletesearch="history" sets the source for the autocomplete.
...And 4 more matches
JavaScript Tips
xul tips when inserting code with an
xul overlay, wrap functions and variables inside an object with a unique name to avoid conflicting with existing or future function and variable names.
...
xul elements have many of the attributes mapped to properties.
...the properties are: align allowevents contextmenu datasources dir flex height id left maxheight maxwidth minheight minwidth observes orient pack persist ref statustext top tooltip tooltiptext width
xul also maps the ordinal attribute but this defaults to "1" if it is not present.
...And 4 more matches
Setting up the Gecko SDK
there is now separate archive with gecko-sdk, just
xul-runner-sdk.): linux: http://ftp.mozilla.org/pub/mozi....8.0.4.tar.bz2 windows: http://ftp.mozilla.org/pub/mozi...vc-1.8.0.4.zip mac: http://ftp.mozilla.org/pub/mozi...ac-1.8.0.4.zip note that the version number for the archives above is 1.8.
... uncompress the gecko sdk, this example uses d:\projects\
xulrunner-sdk\.
... uncompress make.exe, libidl-0.6.dll, glib-1.2.dll to the sdk's bin directory, d:\projects\
xulrunner-sdk\bin.
...And 4 more matches
Adding preferences to an extension - Archive of obsolete content
however, we do need to add one new line to the install.rdf file: <em:optionsurl>chrome://stockwatcher2/content/options.
xul</em:optionsurl> this line establishes the url of the
xul file that describes the options dialog.
... window.addeventlistener("load", function(e) { stockwatcher.startup(); }, false); window.addeventlistener("unload", function(e) { stockwatcher.shutdown(); }, false); design the preference dialog now that we've written all the code, we need to build the
xul file for the options dialog.
... <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <prefwindow id="stockwatcher2-prefs" title="stockwatcher 2 options" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <prefpane id="sw2-stock-pane" label="stock settings"> <preferences> <preference id="pref_symbol" name="extensions.stockwatcher2.symbol" type="string"/> </preferences> <hbox align="center"> <label control="symbol" value="stock to watch: "/> <textbox preference="pref_symbol" id="symbol" maxlength="4"/> </hbox> </prefpane> </prefwindow> the <preferences> block establishes all the settings we implement as well as their types.
...And 3 more matches
Mozilla Application Framework - Archive of obsolete content
editor's note: this article should be rewritten to describe why use
xulrunner to create your own application.
... related:
xulrunner:what
xulrunner provides,
xulrunner hall of fame the mozilla application framework: for powerful, easy to develop cross-platform applications want to build applications?
... framework
xul a comprehensive, cross-platform ui toolkit with an easy-to-learn xml language for defining ui structure, a schema for localization, and support for both native and cross-platform (using css) look and feel to make writing uis quick and painless.
...And 3 more matches
Elements - Archive of obsolete content
the most useful namespaces could be html/xhtml,
xul (xml user interface language), svg (scalable vector graphics) and xlink.
... this way a more-or-less universal namespace declaration in your bindings could be like: <bindings xmlns="http://www.mozilla.org/xbl" xmlns:html = "http://www.w3.org/1999/xhtml" xmlns:
xul = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" xmlns:svg = "http://www.w3.org/2000/svg" xmlns:xlink= "http://www.w3.org/1999/xlink"> binding <!entity % binding-content "(resources?,content?,implementation?,handlers?)"> <!element binding %binding-content;> <!attlist binding id id #required extends cdata #implied display cdata #implied inheritstyle true #implied > the binding element describes a single xbl binding.
...for example, use the value '
xul:button' to create an element that is displayed like a button.
...And 3 more matches
Result Generation - Archive of obsolete content
<?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rel="http://www.
xulplanet.com/rdf/"> <rdf:description rdf:about="http://www.
xulplanet.com/rdf/a"> <rel:relateditem rdf:resource="http://www.
xulplanet.com/rdf/b"/> <rel:relateditem rdf:resource="http://www.
xulplanet.com/rdf/c"/> <rel:relateditem rdf:resource="http://www.
xulplanet.com/rdf/d"/> </rdf:description> <rdf:description rdf:about="http://www.
xulplanet.com/rdf/c"> <rel:relateditem rdf:r...
...esource="http://www.
xulplanet.com/rdf/d"/> </rdf:description> </rdf:rdf> for a
xul template query, you first need to select a starting point in the rdf graph.
...in
xul template terminology, the starting point is called the container or reference point and the endpoint is called the member.
...And 3 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element is created by setting the type attribute of the textbox to autocomplete.
...a change event is fired in different ways for different
xul input elements as listed below: onchange type: script code textbox when enter key is pressed radio/check box when the state is changed select list when the selected item is changed what is accessible the script context at this point can only access the following things: global values/functions i.e.
... window, document, or any of the functions/objects/variables bound to the window object event object example <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <script type="text/javascript"> function myfunction(e){ /* do something cool here or just say the below */ alert(e.target.nodename); } </script> <textbox id="find-text" onchange="return myfunction(event);"/> </window> oninput type: script code this event is sent when a user enters text in a textbox.
...And 3 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element is created by setting the type attribute of a textbox to autocomplete.
...a change event is fired in different ways for different
xul input elements as listed below: onchange type: script code textbox when enter key is pressed radio/check box when the state is changed select list when the selected item is changed what is accessible the script context at this point can only access the following things: global values/functions i.e.
... window, document, or any of the functions/objects/variables bound to the window object event object example <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <script type="text/javascript"> function myfunction(e){ /* do something cool here or just say the below */ alert(e.target.nodename); } </script> <textbox id="find-text" onchange="return myfunction(event);"/> </window> onerrorcommand type: script code this event handler is called when an error occurs when selecting a result from the popup.
...And 3 more matches
Adding Methods to XBL-defined Elements - Archive of obsolete content
xul: <box id="num" class="labeledbutton" title="number of things:" value="52"/> <button label="show" oncommand="document.getelementbyid('num').showtitle(true)"/> <button label="hide" oncommand="document.getelementbyid('num').showtitle(false)"/> xbl: <binding id="labeledbutton"> <content> <
xul:label xbl:inherits="value=title"/> <
xul:label xbl:inherits="value"/> </content> <implementa...
...tion> <method name="showtitle"> <parameter name="state"/> <body> if (state) { document.getanonymousnodes(this)[0].setattribute("style", "visibility: visible"); } else { document.getanonymousnodes(this)[0].setattribute("style", "visibility: collapse"); } </body> </method> </implementation> </binding> two buttons added to the
xul have oncommand handlers which are used to change the visibility of the label.
...for example, we could move the show and hide buttons into the xbl file and do the following: example 1: source <binding id="labeledbutton"> <content> <
xul:label xbl:inherits="value=title"/> <
xul:label xbl:inherits="value"/> <
xul:button label="show" oncommand="document.getbindingparent(this).showtitle(true);"/> <
xul:button label="hide" oncommand="document.getbindingparent(this).showtitle(false);"/> </content> <implementation> <method name="showtitle"> <parameter name="state"/> <body> if (state) { doc...
...And 3 more matches
Commands - Archive of obsolete content
first, it moves all your operations onto commands which can all be grouped together in one section of the
xul file.
... it is normal to put a group of commands inside a commandset element, together near the top of the
xul file, as in the following: <commandset> <command id="cmd_open" oncommand="alert('open!');"/> <command id="cmd_help" oncommand="alert('help!');"/> </commandset> a command is invoked when the user activates the button or other element attached to the command.
...this function may be separate from the
xul itself, and might be handled internally by a widget.
...And 3 more matches
Cross Package Overlays - Archive of obsolete content
call the file foverlay.
xul and add it to the findfile directory along with findfile.
xul.
... our foverlay.
xul example source <?xml version="1.0"?> <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <toolbox id="browser-toolbox"> <toolbar id="findfile_toolbar"> <label control="findfile_filename" value="search for files named:"/> <textbox id="findfile_filename"/> <label control="findfile_dir" value="directory:"/> <textbox id="findfile_dir"/> <button label="browse..."/> </toolbar> </toolbox> </overlay> you can view this by changing the overlay to a window.
...this value (browser-toolbox) is the same as the identifier of the toolbox in the browser window (navigator.
xul).
...And 3 more matches
Focus and Selection - Archive of obsolete content
example 3 : source view <window id="focus-example" title="focus example" onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <script> function init(){ addeventlistener("focus",setfocusedelement,true); } function setfocusedelement(){ var focused = document.commanddispatcher.focusedelement; document.getelementbyid("focused").value = focused.tagname; } </script> <hbox> <label control="username" value="user name:"/> <textbox id="username"/> </hbox> <button label="hello"/> <checkbox label="remember this deci...
...this is because
xul text boxes are implemented using the html input widget, so the focus event is received for that element instead.
...the simplest is to call the focus method of a the
xul element that you wish to set the focus to.
...And 3 more matches
Input Controls - Archive of obsolete content
« previousnext »
xul has elements that are similar to the html form controls.
...
xul has a similar element, textbox, used for text entry fields.
... note that while in html, several different kinds of fields can be created with the input element, in
xul there are separate elements for each type.
...And 3 more matches
Introduction to RDF - Archive of obsolete content
however, it would be inconvenient to do so by entering the data directly into the
xul file.
... it would make it very difficult to modify the bookmarks if they were directly in the
xul file.
...rdf can also populate other
xul elements as well such as listboxes and menus.
...And 3 more matches
Modifying the Default Skin - Archive of obsolete content
skin basics a skin is a set of style sheets, images and behaviors that are applied to a
xul file.
...the
xul for any skins is the same, however the style sheets and images used are different.
...the global directory within this archive contains the main style definitions for how to display the various
xul elements.
...And 3 more matches
Trees - Archive of obsolete content
« previousnext »
xul provides a way to create tabular or hierarchical lists using a tree.
... the tree one of the more complex elements in
xul is the tree.
...fortunately,
xul provides a couple of built-in view implementations which do most of the hard work for you.
...And 3 more matches
iframe - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an inner frame that works much like the html <iframe> element.
... currently,
xul iframes running in remote processes are not supported.
... if you want to run content in a remote process, use a
xul browser element.
...And 3 more matches
Application Update - Archive of obsolete content
this article will hopefully explain how to update your
xulrunner application using the same method that firefox, thunderbird, songbird, and chatzilla use.
... getting started you will need the following utility scripts from http://lxr.mozilla.org/mozilla/sourc...ate-packaging/ (or local source of
xulrunner) common.sh make_full_update.sh you will need mar / mar.exe to build a complete update patch.
... application settings you will need to configure the following settings in your application: branding the update process uses branding information, setup branding for your application as described here:
xulrunner tips icons the updater process for linux systems requires updater.png to be in your <application folder>/icons/, see https://bugzilla.mozilla.org/show_bug.cgi?id=706846 preferences // whether or not app updates are enabled pref("app.update.enabled", true); // this preference turns on app.update.mode and allows automatic download and // install to take place.
...And 3 more matches
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.platform - november 11th - november 17th, 2006 announcements no announcements this week traffic
xulrunner: <browser> not allowing javascript popup windows b notes that when using
xul elements <browser/> and <tabbrowser/> the javascript popup windows don't work out of the box and asks what needs to be implement.
... alex vincent ran into some difficulty with
xulrunner extension manager not recognizing
xulwidgets for verbosio?
... however he found out that it was a result of his flat-chrome version of
xul widgets and works fine with the jarred-chrome version.
...And 3 more matches
XForms Custom Controls - Archive of obsolete content
since firefox 4, xbl and
xul are disabled by default for all pages not loaded from a chrome:// url.
...it is possible to re-enable this by following the steps on using remote
xul.
...custom data types - existing xforms controls are not able to work properly with your data type advanced xforms controls - you need your controls to be able to do more things than traditional xforms controls can do new host language - you'd like to support xforms in host languages other than xhtml or
xul custom presentation the mozilla xforms extension cannot anticipate all of the possible use cases that will evolve in web applications and web pages as xforms matures and the user base grows.
...And 3 more matches
XForms Select1 Element - Archive of obsolete content
representations the xforms select1 element can be represented by the following widgets for the specified appearance attribute values: combobox - default representation (xhtml/
xul) listbox - used when appearance = 'compact' (xhtml/
xul) radio group - used when appearance = 'full' (xhtml/
xul) combobox displaying a combobox is the default representation (xhtml/
xul).
...loses focus), otherwise it is updated upon item selection
xul widget characteristics analogous widgets are <html:select/> and <
xul:menulist/> visual grouping by choices element isn't implemented selection="open" attribute isn't supported if incremental attribute value is false, the bound node is updated when the select control is blurred (i.e.
... loses focus), otherwise it is updated upon item selection listbox the select1 is represented as listbox (xhtml/
xul).
...And 3 more matches
Archive of obsolete content
creating a status bar extension many of the concepts introduced here apply to any
xul-based application; however, to keep from getting completely overwhelmed, we're going to focus specifically on firefox.
... install.js see also this article from
xulplanet's main tutorial.
...performing a few simple steps makes your extension much easier to localize into various languages without having to edit the
xul or javascript files themselves.
...And 3 more matches
Common causes of memory leaks in extensions - Extensions
for example, in
xul overlay code: var contentwindows = []; function inbrowser
xuloverlay(contentwindow) { // forgetting or failing to pop the content window thing again contentwindows.push(contentwindow); } this will keep the content window compartments alive until the browser window is closed.
...consider the following example code that could be part of your browser.
xul overlay: gbrowser.addeventlistener("domcontentloaded", function(evt) { var contentdoc = evt.originaltarget; var i = 0; // refresh the title once each second setinterval(function() { contentdoc.title = ++i; }, 1000); }, false); one would normally expect that the interval (or timer) would be destroyed as soon as the document unloads, in the same way that event listeners are automa...
...however, while this is still true, the window.setinterval() in the example originates from the outer chrome window (browser.
xul) and not from the content window.
...And 3 more matches
Command line options
xulrunner -app /path/to/application.ini start a new process running the
xulrunner application at path/to.
... --install-app path/to/myapplication.(xpi|
xulapp) installs the
xulrunner application at path/to onto the system.
... "c:\program files\mozilla
xulrunner\1.8.0.4\
xulrunner\
xulrunner.exe" --install-app "c:\users\billdo\desktop\myapplication.xpi" /opt/
xulrunner/1.8.0.4/
xulrunner/
xulrunner --install-app ~/desktop/myapplication.
xulapp /library/frameworks/
xul.framework/
xulrunner-bin --install-app ~/desktop/myapplication.xpi --register-global registers
xulrunner on the system for all users.
...And 3 more matches
Using JavaScript code modules
the module is loaded into a specific javascript scope, such as
xul script or javascript xpcom script, using components.utils.import() or components.utils["import"]().
... scope 1: components.utils.import("resource://app/my_module.jsm"); alert(bar.size + 3); // displays "6" bar.size = 10; scope 2: components.utils.import("resource://app/my_module.jsm"); alert(foo()); // displays "foo" alert(bar.size + 3); // displays "13" this sharing behavior can be used to create singleton objects that can share data across windows and between
xul script and xpcom components.
...the basic syntax of a resource url is as follows: resource://<alias>/<relative-path>/<file.js|jsm> the <alias> is an alias to a location, usually a physical location relative to the application or
xul runtime.
...And 3 more matches
WebRequest.jsm
browser object the
xul browser into which the resource will be loaded, or null if the resource will not be loaded into a
xul browser.
... browser object the
xul browser into which the resource will be loaded, or null if the resource will not be loaded into a
xul browser.
... browser object the
xul browser into which the resource will be loaded, or null if the resource will not be loaded into a
xul browser.
...And 3 more matches
How to build a binary XPCOM component using Visual Studio
not the simplest thing to do and it may be incompatible with production releases of firefox, thunderbird, and
xulrunner from mozilla.
... for example,
xulrunner 1.8.0.4 which has a pre-built sdk at gecko-sdk-win32-msvc-1.8.0.4.zip.
...the tutorial assumes the folder is called
xulrunner-1.8.0.4, but you can call yours whatever you want.
...And 3 more matches
nsIControllers
content/
xul/document/public/nsicontrollers.idlscriptable represents a list of nsicontroller elements.
...
xul elements can also have controllers, although they do not have any default controllers.
... implemented by: @mozilla.org/
xul/
xul-controllers;1.
...And 3 more matches
Building an Account Manager Extension
xtension.prototype._xpcom_categories: [{ category: "mailnews-accountmanager-extensions" }], // create entry point for the module if (xpcomutils.generatensgetfactory) var nsgetfactory = xpcomutils.generatensgetfactory([devmoaccountmanagerextension]); else var nsgetmodule = xpcomutils.generatensgetmodule([devmoaccountmanagerextension]); step3: create the new panel as next step we create the
xul and the property file for your new panel.
...this means the
xul file for the new panel has to be located in chrome://example@mozilla.org/content/am-devmo-account.
xul.
... the
xul file needs a page element as root element, with a special on load command.
...And 3 more matches
Troubleshooting XPCOM components registration
load failure of binary components on the mozilla trunk (firefox 3,
xulrunner 1.9), components that fail to load will print an error to the error console.
... if using firefox 4 /
xulrunner 2.0, make sure that your extension is unpacked and you declared the binary component in your chrome.manifest.
... when adding a component to a
xulrunner application, change the buildid in application.ini.
...And 3 more matches
DevTools API - Firefox Developer Tools
getnotificationbox() returns a <
xul:notificationbox> element for the toolbox that can be used to display notifications to the user.
...accesskey for the developer menu <
xul:menuitem>.
... console.log("network monitor initialized to toolbox", toolbox); }); toolsidebar to build a sidebar in your tool, first, add a
xul:tabbox where you want the sidebar to live: <splitter class="devtools-side-splitter"/> <tabbox id="mytool-sidebar" class="devtools-sidebar-tabs" hidden="true"> <tabs/> <tabpanels flex="1"/> </tabbox> a sidebar is composed of tabs.
...And 3 more matches
Index - Web APIs
949 document.popupnode api, dom, deprecated, property, reference when a popup attached via the popup or context attributes is opened, the
xul document's popupnode property is set to the node that was clicked on.
... 967 document.tooltipnode api, api:mozilla extensions, dom, draft, gecko, mozilla, non-standard, property, reference the document.tooltipnode property returns the node which is the target of the current <
xul:tooltip>.
... 1558 html drag and drop api advanced, guide, html5, overview,
xul, drag and drop, events html drag and drop interfaces enable applications to use drag-and-drop features in browsers.
...And 3 more matches
HTML to DOM - Archive of obsolete content
using a hidden
xul iframe (alternate example) sometimes, a browser element is overkill, or does not meet your needs, or you can't fulfill its requirements.
... while working on donkeyfire, i discovered the iframe
xul element, and it is very easy to implement it.
... as an example, i will show a browser overlay .
xul file, and some javascript code to access it.
...And 2 more matches
Install Manifests - Archive of obsolete content
introduction an install manifest is the file an add-on manager-enabled
xul application (e.g.
... examples <em:version>2.0</em:version> <em:version>1.0.2</em:version> <em:version>0.4.1.2005090112</em:version> firefox 1.5 /
xulrunner 1.8 - add-ons that do not use a valid version format will not be installed.
... examples <em:abouturl>chrome://myext/content/about.
xul</em:abouturl> bootstrap a boolean value that tells the application whether the extension is boot-strappable.
...And 2 more matches
Appendix D: Loading Scripts - Archive of obsolete content
most add-ons and
xul runner applications provide their primary functionality by loading and executing javascript code.
... <script> tags
xul script tags are traditionally the primary means of loading scripts for extension developers.
... these tags are generally inserted into
xul overlay files or other
xul documents, after which they are automatically loaded into the context of the
xul window in question and executed immediately and synchronously.
...And 2 more matches
Intercepting Page Loads - Archive of obsolete content
some of the techniques presented here apply only to content loaded in the main browser area, while others detect content being loaded in other
xul windows, or even detect
xul content being loaded.
...in most cases you'll need to compare the page url with some string or regular expression: if (some_regular_expression.test(doc.defaultview.location.href)) you can access and modify the dom of the loaded page, just like you normally would for
xul and html documents.
... if you are building a web filtering extension, you should keep in mind that
xul windows such as the dom inspector window and the add-ons manager window allow (limited) web navigation.
...And 2 more matches
Mozilla Documentation Roadmap - Archive of obsolete content
there's a great deal of free online documentation available on
xul and extension development, but finding it and turning it into useful information can be a daunting task.
...it encompasses firefox, other mozilla products, javascript, css,
xul, web and extension development guidelines, accessibility, usability, best practices...
...the documentation on interfaces is very complete, but it isn't nearly as useful as the documentation that existed at
xulplanet and was later taken down.
...And 2 more matches
User Notifications and Alerts - Archive of obsolete content
notification boxes are very easy to create, and are very customizable: let nb = gbrowser.getnotificationbox(); let acceptbutton = new object(); let declinebutton = new object(); let message = this._bundle.getstring("
xulschoolhello.friendmessage.label"); let that = this; acceptbutton.label = this._bundle.getstring("
xulschoolhello.acceptbutton.label"); acceptbutton.accesskey = this._bundle.getstring("
xulschoolhello.acceptbutton.accesskey"); acceptbutton.popup = null; acceptbutton.callback = function() { that.acceptrequest(); }; // similarly for decline button.
... nb.appendnotification( message, "
xulschoolhello-friend-notification", "chrome://
xulschoolhello/skin/friend-notification.png", nb.priority_info_high, [ acceptbutton, declinebutton ]); all browser tabs have a notification box by default, so you don't need to do any overlaying.
...on the other hand, alerts are displayed only temporarily using the alerts service is similar to using notification boxes: let alertsservice = cc["@mozilla.org/alerts-service;1"].getservice(ci.nsialertsservice); let title = this._bundle.getstring("
xulschoolhello.greeting.title"); let message = this._bundle.getstring("
xulschoolhello.greeting.label"); alertsservice.showalertnotification( "chrome://
xulschoolhello/skin/hello-notification.png", title, message, true, "", this, "
xulschool hello message"); we pass this as an argument, assuming that this is an object that implements nsiobserver.
...And 2 more matches
List of Former Mozilla-Based Applications - Archive of obsolete content
applications that switched to another technology name description additional information angelsoft tools for startups, vcs, and angel investors switched from
xulrunner-based client to a web application autodesk maya 3d modeling tool switched off of gecko for help browser in version 8.5 blam feed reader switched to webkit in version 1.8.6 boxee media center software switched to webkit in version 1.0 epiphany browser switched from gecko to webkit flock social browsing flock switched ...
...from being firefox-based to chromium-based when it released a new beta on june 16, 2010 jolicloud web operating system as of march 2010, rw/w reports jolicloud is on chrome/chrome os joost tv over internet switched from
xulrunner-based client to a web application liferea news aggregator switched to webkit in version 1.6 manyone browser browser originally mozilla-based but now i believe the have a web-based tool (need reference for that) miro (formerly democracy player) video switched from
xulrunner to webkit in version 3.0.2 moblin browser browser when moblin became meego it switched from a custom gecko-based browser to chrome nautilus file manager hasn't used mozilla code since version 2.
...0 raptr client gaming client was a
xulrunner app initially but now uses adobe air rift technologies software installation over internet no longer using mozilla technology -- need confirmation and details second life virtual world desktop client switched from embedded mozilla browser to a plugin architecture with a qtwebkit plugin applications that are no longer being developed name description additional information aphrodite browser inactive aol client for mac internet software no longer available beonex communicator internet software last news item on site from 2004 chameleon theme builder inactive civil netizen p2p file delivery (email attachment repla...
...And 2 more matches
Notes on HTML Reflow - Archive of obsolete content
the
xul box layout model, on the other hand, is constraint based , meaning that geometric preferences and constraints of neighboring elements are taken into consideration before the elements' final geometry can be computed.
... the box is the geometric primitive for the
xul layout model.
...html and
xul interaction as mentioned above, html and
xul have fundamentally different layout models, the former being a flow-based model, and the latter being a constraint based model.
...And 2 more matches
Adding the structure - Archive of obsolete content
to implement this ui, we'll add a statusbarpanel element to the statusbar element in the navigator.
xul file.
...ar" id="statusbar-icon" mode="normal" value="0"/> </statusbarpanel> <statusbarpanel class="statusbarpanel-iconic" id="tinderbox-status" status="none"/> <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/> <statusbarpanel class="statusbarpanel-iconic" id="security-button" onclick="browserpageinfo(null, 'securitytab')"/> </statusbar> the statusbar
xul element defines a horizontal status bar where informative messages about an application's state can be displayed.
... status bars comprise a series of panels, each one defined by a statusbarpanel
xul element.
...And 2 more matches
Drag and Drop JavaScript Wrapper - Archive of obsolete content
you can include this file in your
xul file with the script tag in the same way you would include your own scripts.
... the library also depends on another script library, which you should also include, usually at the top of your
xul file.
...note that you can only use these libraries from within
xul loaded via a chrome url.
...And 2 more matches
GRE Registration - Archive of obsolete content
when installing a gre via the command line <tt>
xulrunner.exe -register-global</tt>,
xulrunner will detect that there is already an installation at hklm/software/mozilla.org/gre/<version> and will try alternate keys <version>_1 _2 until an available key is found.
... mac on mac, the only gre is the lib
xul framework
xul.framework.
... this framework is installed either in /library/frameworks/
xul.framework/versions/<version> or in ~/library/frameworks/
xul.framework/versions/<version>.
...And 2 more matches
Java in Firefox Extensions - Archive of obsolete content
liveconnect gives your extension's javascript code (linked from or contained in
xul code) access to 2 objects: java and packages (note that per this thread, although the new documentation for the liveconnect reimplementation states that these globals will be deprecated (in the context of applets), "firefox and the java plug-in will continue to support the global java/packages keywords, in particular in the context of firefox extensions.").
... the following technique only works in javascript code linked from or contained in
xul files.
...a good reason for calling java from within an xpcom component rather than from
xul is to maintain a singleton (some singular java object) across all firefox windows.
...And 2 more matches
Prism - Archive of obsolete content
prism is a simple
xulrunner-based browser that hosts web applications without the normal web browser user interface.
... architectural overview prism is a
xulrunner application.
... in addition to the browser engine included in
xulrunner, it consists of: web app bundle management: code for creating new web app bundles and loading existing bundles.
...And 2 more matches
RDF Datasource How-To - Archive of obsolete content
using
xul, you can display the contents of your datasource in a tree control, a menu, or a toolbar.
... in fact, you can convert rdf to an arbitrary content model using
xul templates.
... the following
xul fragment illustrates how to instantiate a tree control whose body is "rooted" to a resource (http://foo.bar.com/) that your datasource describes: <window xmlns:html="http://www.w3.org/1999/xhtml" xmlns:rdf="http://www.w3.org/tr/wd-rdf-syntax#" xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.
xul"> <tree datasources="rdf:my-datasource" ref="http://foo.bar.com/"> <template> <treechildren> <treeitem uri="..."> <treerow> <treecell> <text value="rdf:http://home.netscape.com/nc-rdf#name" /> </treecell> <treecell> <text value="rdf:http://home.netscape.com/nc-rdf#url" /> </treecell> </treerow> </treeitem> </treechildren> </template> ...
...And 2 more matches
When To Use ifdefs - Archive of obsolete content
the mozilla codebase is used for many different projects and products, including firefox, thunderbird,
xulrunner, and many others.
...for instance, it is possible to disable most of the
xul rendering engine by specifying --disable-
xul when configuring the build.
...for instance, xpcom, the spidermonkey javascript engine, and the networking engine do not know anything about
xul and should not have any ifdefs based on --disable-
xul.
...And 2 more matches
Menus - Archive of obsolete content
xul provides a number of tags for creating menus.
... the menubar element a menu bar is created by using the
xul menubar tag.
...the first menubar encountered when parsing the
xul window will be used as the main menu bar for the window, and on the macintosh, will be hidden from the main window and transformed into a native menu bar at the top of the screen.
...And 2 more matches
Multiple Queries - Archive of obsolete content
here is an example using an rdf datasource: <hbox id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.
xulplanet.com/rdf/myphotos"> <template> <queryset> <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="canal"/> </query> <action> <button uri="?photo" image="?photo" label="view" orient="vertical"/> </a...
...here are the results that would be generated by the first query above, before any bindings are applied: (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/canal.jpg, then, the builder adds the three results generated from the second query: (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/canal.jpg) (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/palace.jpg) (?start = h...
...ttp://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/canal.jpg) (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/obelisk.jpg) so four possible results are available, one from the first query and three from the second.
...And 2 more matches
Recursive Generation - Archive of obsolete content
here is the content that was generated after one iteration: <vbox datasources="http://www.
xulplanet.com/ds/sample.rdf" ref="http://www.
xulplanet.com/rdf/a"> <template> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.
xulplanet.com/rdf/relateditem" object="?relateditem"/> </query> <action> <hbox uri="?relateditem"> <button label="?start"/> <button label="?relateditem"/> </h...
...box> </action> </template> <hbox id="http://www.
xulplanet.com/rdf/b"> <button label="http://www.
xulplanet.com/rdf/a"/> <button label="http://www.
xulplanet.com/rdf/b"/> </hbox> <hbox id="http://www.
xulplanet.com/rdf/c"> <button label="http://www.
xulplanet.com/rdf/a"/> <button label="http://www.
xulplanet.com/rdf/c"/> </hbox> <hbox id="http://www.
xulplanet.com/rdf/d"> <button label="http://www.
xulplanet.com/rdf/a"/> <button label="http://www.
xulplanet.com/rdf/d"/> </hbox> </vbox> for the next iteration, the insertion point will be the three <hbox> elements.
...to begin, b is evaluated and seeded with the right value: (?start = http://www.
xulplanet.com/rdf/b) the <triple> statement is then examined, however, item b doesn't have a relateditem arc out of it, so the result is rejected.
...And 2 more matches
Special Condition Tests - Archive of obsolete content
for instance, we might use the following: <vbox datasources="template-guide-streets.rdf" ref="http://www.
xulplanet.com/rdf/myneighbourhood"> <template> <rule parent="vbox"> <groupbox uri="rdf:*"> <caption label="rdf:http://purl.org/dc/elements/1.1/title"/> </groupbox> </rule> <rule> <label uri="rdf:*" value="rdf:http://www.
xulplanet.com/rdf/address"/> </rule> </template> </vbox> on the first pass, the container where generated content would be inserted is a...
...here is the same example using the extended template syntax: <vbox datasources="template-guide-streets.rdf" ref="http://www.
xulplanet.com/rdf/myneighbourhood"> <template> <query> <content uri="?start"/> <member container="?start" child="?item"/> </query> <rule parent="vbox"> <binding subject="?item" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <action> <groupbox uri="?item"> <caption label="?title"/> </groupbox> </action> </ru...
...le> <rule> <binding subject="?item" predicate="http://www.
xulplanet.com/rdf/address" object="?address"/> <action> <label uri="?item" value="?address"/> </action> </rule> </template> </vbox> containment tests for rdf sources, the simple rule syntax supports two special conditional tests that are commonly used with multiple rules.
...And 2 more matches
Adding Buttons - Archive of obsolete content
like html,
xul has a number of tags that can be used to create user interface elements.
... the findfile.
xul example let's add this code to the file findfile.
xul that we created in the previous section.
...the code to add is shown in red below: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <button id="find-button" label="find"/> <button id="cancel-button" label="cancel"/> </window> you'll notice that the cancel button was added also.
...And 2 more matches
Creating Dialogs - Archive of obsolete content
« previousnext » a
xul application will often require dialogs to be displayed.
... var somefile=document.getelementbyid('enterfile').value; window.opendialog("chrome://findfile/content/showdetails.
xul","showmore", "chrome",somefile); in this example the dialog showdetails.
xul is displayed.
...you do not need to include the
xul for each button; however, you do need to supply code to perform the appropriate tasks when the user presses each button.
...And 2 more matches
Install Scripts - Archive of obsolete content
in an html document, or a
xul document, the window object is the root global object.
...you don't need to know much about it to create
xul applications unless you are creating your own xpcom components.
...for example: /
xulplanet/find files /netscape/personal security manager the first example is what we'll use for the find files dialog.
...And 2 more matches
List Controls - Archive of obsolete content
« previousnext »
xul has a number of types of elements for creating list boxes.
...
xul provides two types of elements to create lists, a listbox element to create multi-row list boxes, and a menulist element to create drop-down list boxes.
... they work similar to the html select element, which performs both functions, but the
xul elements have additional features.
...And 2 more matches
Persistent Data - Archive of obsolete content
« previousnext » this section describes how to save the state of a
xul window.
...conveniently,
xul provides such a mechanism to save the state of a window.
...
xul allows you to save the state of any element.
...And 2 more matches
Templates - Archive of obsolete content
populating elements
xul provides a method in which we create elements from data supplied by rdf, either from an rdf file or from an internal datasource.
... the new elements that are created are functionally no different from ones that you put directly in the
xul file.
...more about resource syntax (
xulplanet).
...And 2 more matches
Using Spacers - Archive of obsolete content
(java uses layout managers for example.)
xul provides the capability for elements to position and resize automatically.
...
xul uses a layout system called the 'box model'.
...before we get into detail about boxes, we'll introduce another
xul element that is useful for layout, the spacer.
...And 2 more matches
Using the standard theme - Archive of obsolete content
by default, no style is associated with
xul extension windows or dialogs.
... at the beginning, there is no style when creating a new
xul <tt>window</tt> (or a new <tt>dialog</tt>, for that matter) in your extension, and you do not associate a style sheet with it, your widgets will be unstyled.
... applying the standard theme in order to use the theme currently chosen by the user of the base application (the so called "global skin"), you have to add the following line to your
xul file: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> this imports the styles found in the <tt>global/skin</tt> chrome directory and will make the standard
xul widgets of your application use the selected chosen theme.
...And 2 more matches
menuitem - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a single choice in a menupopup element.
... more information is available in the
xul tutorial.
... more information on adding checkmarks to menus in the
xul tutorial validate type: one of the values below this attribute indicates whether to load the image from the cache or not.
...And 2 more matches
scale - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a scale (sometimes referred to as a "slider") allows the user to select a value from a range.
... normal for scales, the scale's values are ordered from left to right (for horizontal scales) or from top to bottom (for vertical scales) for other elements, the elements are placed left to right or top to bottom in the order they appear in the
xul code.
...this is reverse of the order in which they appear in the
xul code.
...And 2 more matches
textbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an input field where the user can enter text.
... more information is available in the
xul tutorial.
... inputfield type: textbox element in mozilla, the
xul textbox is implemented as a wrapper around an html input element.
...And 2 more matches
Custom app bundles for Mac OS X - Archive of obsolete content
this tutorial will show you how to package your
xulrunner-based application in a way which is consistent with the expectations of mac os x users.
...a
xul application for mac os x should follow something similar to this basic directory structure: example.app/ contents/ info.plist (application bundle properties are specified in this xml file.) pkginfo (this is a simple text file and is created along with the info.plist file) macos/ (the macos folder will contain your
xulrunner executable)
xulrunner (this is the
xulrunner stub) resources/ (this is where you place your
xul application code and support files) application.ini (
xulrunner-related application settings) example.icns (this is the icon which...
... will be used by your application bundle) chrome/ content/ example.
xul (this directory contains your application's chrome) example.manifest defaults/ preferences/ app-prefs.js (this provides some default values for preferences) application bundle contents in addition to the standard directory hierarchy that's required of all mac os x applications, as shown above in application bundle layout, there are some specific rules for what content goes where: the top-level directory is given a name that ends with .app which designates the whole package as an application bundle.
...And 2 more matches
Specifying Startup Chrome Window - Archive of obsolete content
main chrome window in order to specify the main chrome window of your
xulrunner application, you'll need to add a preferences file to your application directory structure and add a preference named toolkit.defaultchromeuri to that file.
... let's look at the
xulmine
xulrunner application.
... it's directory structure is as follows:
xulmine ├───chrome ├───components └───defaults └───preferences in defaults/preferences, there is a file named
xulmine.js.
...And 2 more matches
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.builds - november 17th to november 24th 2006 trouble building
xulrunner 1.8.4 on winxp using mingw32 november 20th: joe is trying to build
xulrunner using the ming compiler on windowsxp.
... he is using make 3.80, working with the source tarball for
xulrunner 1.8.4,running "make -f client.mk distclean" followed by "make -f client.mk build_all".
... building xpcom components with msvs 2005 november 21st: buffaloaf is having trouble getting a personal xpcom component to work under
xulrunner when compiled with msvs 2005.
...And 2 more matches
2006-09-29 - Archive of obsolete content
summary of newsgroup moz.dev.platform summary: mozilla.dev.platform - september 22 - 29, 2006 announcements firefox 2 release candidate 1 is now available for download announcing that firefox 2 rc 1 is available for download discussions
xulrunner fails without feedback on osx intel 10.4.7 will morton is trying to port a
xul application to osx.
... when he runs
xulrunner from the command line, it fails silently without any errors.
... this happens with all his
xulrunner ports, with
xulrunner 1.8.0.1, 1.8.0.4 and nightly 1.8.
...And 2 more matches
Window.importDialog() - Archive of obsolete content
this function was only available in the original,
xul-based version of firefox for android, which is no longer supported; for that reason, this function is obsolete and should never be used.
...instead of opening a new window, it merges the specified
xul dialog into the main window.
... asrc the chrome url of the
xul dialog.
...And 2 more matches
RFE to the Custom Controls - Archive of obsolete content
this page could be of particular interest to people using custom controls in
xul documents for the following reason.
...
xul, in many cases, is much better suited for application development than xhtml.
... therefore the control set may need to be more extensive to address the wider spectrum of requirements that a
xul application will have on its controls.
...And 2 more matches
Accessibility API cross-reference
to do fill out mac api column.(mac os x - carbon accessibility api and accessibility constants) finish aria column - add explanation of the term 'abstract role' fill out html column create aom column fill out
xul column.
...rface (iaccessible), wherease gnome accessibility uses a lot of different interfaces depending on the type of object go through the atk info and make sure it's up-to-date accessible roles description & notes msaa role (role_system_*) java accessibility role gnome accessibility role (atk_role_*) mac os x accessibility role aria (role=*) html tagged pdf relevant
xul for alerts, in java/gnome for any alert, in msaa if no other role applies.
... n/a contains accessible info, but its role is not known n/a n/a unknown accessible states and properties description & notes msaa state (state_system_*) java accessibility state gnome accessibility state (atk_state_*) mac os x accessibility state aria state or property html attribute tagged pdf relevant
xul used in aria to denote non-conformant user input n/a n/a invalid aria-invalid this window is currently the active window n/a active active n/a identifies the currently active element when focus is on a composite widget, textbox, group, or application.
...And 2 more matches
Performance best practices for Firefox front-end engineers
hide your panels if you’re adding a new
xul <
xul:popup> or <
xul:panel> to a document, set the hidden attribute to true by default.
... by doing so, you cause the binding applied on demand rather than at load time, which makes initial construction of the
xul document faster.
... when css is applied to a document (html or
xul, it doesn’t matter), the browser does calculations to figure out which css styles will apply to each element.
...And 2 more matches
Preferences system
the system is implemented through a few
xul elements and attributes.
... reference information about them is available below: preferences system documentation: introduction: getting started | examples | troubleshooting reference: prefwindow | prefpane | preferences | preference |
xul attributes use code for a typical preferences window may look like this: <prefwindow id="apppreferences" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <prefpane id="pane1" label="&pane1.title;"> <preferences> <preference id="pref1" name="pref.name" type="bool"/> </preferences> ..
... ui elements that refer to the preferences above, e.g.: <checkbox id="check1" preference="pref1" label="&check1.label;" accesskey="&check1.accesskey;"/> </prefpane> <prefpane id="pane2" label="&pane2.title;" src="chrome://uri/to/pane.
xul"/> </prefwindow> pane content can be specified inline or an external chrome uri supplied for pane content to be loaded in via a dynamic overlay.
...And 2 more matches
AT APIs Support
on mac platform camino - web browser for os x
xul applications
xul applications make full use of the gecko architecture, not only for html content, but also for the entire user interface.
... widgets such as menus, tab panels, tree views and dialogs are provided via an xml language called
xul (extensible user-interface language).
...developing a
xul window is not that different from developing a web page, but the elements available to add widgets are more powerful and designed to be similar to desktop widgets.
...And 2 more matches
nsIAccessibleProvider
for example now it is used by <
xul:iframe>, <
xul:browser> and <
xul:editor>.
...
xul controls constants constant value description
xulalert 0x00001001
xulbutton 0x00001002
xulcheckbox 0x00001003
xulcolorpicker 0x00001004
xulcolorpickertile 0x00001005
xulcombobox 0x00001006
xuldropmarker 0x00001007
xulgroupbox 0x00001008
xulimage 0x00001009
xullink 0x0000100a
xullistbox 0x0000100b
xullistcell 0x00001026
xullisthead 0x00001024
xullistheader 0x00001025
xullistitem 0x0000100c
xulmenubar 0x0000100d
xulmenuitem 0x0000100e
xulmenupopup 0x0000100f
xulmenuseparator 0x00001010
xulpane 0x00001011
xulprogressmeter 0x00001012
xulscale 0x00001013
xulstatusbar 0x00001014
xulradiobutton 0x00001015
xulradiogroup 0x00001016
xultab 0x00001017 the single tab in a dialog or tabbrowser/...
...
xultabbox 0x00001018 a combination of a tabs object and a tabpanels object.
...And 2 more matches
Preferences System
the system is implemented through a few
xul elements and attributes.
... reference information about them is available below: preferences system documentation: introduction: getting started | examples | troubleshooting reference: prefwindow | prefpane | preferences | preference |
xul attributes use code for a typical preferences window may look like this: <prefwindow id="apppreferences" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <prefpane id="pane1" label="&pane1.title;"> <preferences> <preference id="pref1" name="pref.name" type="bool"/> </preferences> ..
... ui elements that refer to the preferences above, e.g.: <checkbox id="check1" preference="pref1" label="&check1.label;" accesskey="&check1.accesskey;"/> </prefpane> <prefpane id="pane2" label="&pane2.title;" src="chrome://uri/to/pane.
xul"/> </prefwindow> pane content can be specified inline or an external chrome uri supplied for pane content to be loaded in via a dynamic overlay.
...And 2 more matches
Index - Firefox Developer Tools
6 dom inspector dom, dom:tools, dom_inspector, extensions, extensions:tools, themes, themes:tools, tools, web development, web development:tools,
xul,
xul:tools the dom inspector (also known as domi) is a developer tool used to inspect, browse, and edit the document object model of documents - usually web pages or
xul windows.
...the one you are likely to be most familiar with is its inspector.
xul-based primary ui.
...dom inspector is standalone; it supports all toolkit applications, and it's possible to embed it in your own
xulrunner app.
...And 2 more matches
Modules - Archive of obsolete content
we will show how to do each of these things using the built-in components object provided by
xulrunner application such as firefox and thunderbird.
...applications such as firefox and thunderbird are based on
xulrunner.
...
xulrunner adds a built-in object, known as components, to the global scope.
...passing an
xul url will result in a compartment with chrome privileges (note, however, that if you ever actually do this in any of your code, gabor will be forced to hunt you down and kill you).
Porting the Library Detector - Archive of obsolete content
this example walks through the process of porting a
xul-based add-on to the sdk.
... how the library detector works all the work is done inside a single file, librarydetector.
xul this contains: a
xul overlay a script the
xul overlay adds a box element to the browser's status bar: the script does everything else.
... once the list is built, the switchlibraries() function constructs a
xul statusbarpanel element for each library it found, populates it with the icon at the corresponding chrome:// url, and adds it to the box.
...content = buildwidgetviewcontent(tab.libraries); widgetview.width = tab.libraries.length * icon_width; } main.js will use the tabs module to update the widget's content when necessary (for example, when the user switches between tabs): tabs.on('activate', function(tab) { updatewidgetview(tab); }); tabs.on('ready', function(tab) { tab.libraries = []; }); showing the library detail the
xul library detector displayed the detailed information about each library on mouseover in a tooltip: we can't do this using a widget, so instead will use a panel.
window/utils - Archive of obsolete content
get
xulwindow(window) returns the nsi
xulwindow for the given nsidomwindow: var { ci } = require('chrome'); var utils = require('sdk/window/utils'); var active = utils.getmostrecentbrowserwindow(); active instanceof ci.nsi
xulwindow // => false utils.get
xulwindow(active) instanceof ci.nsi
xulwindow // => true parameters window : nsidomwindow returns nsi
xulwindow getbasewindow(window) returns the nsi...
...defaults to "chrome://browser/content/browser.
xul".
... isbrowser(window) returns true if the given window is a firefox browser window: that is, its document has a "windowtype" of "chrome://browser/content/browser.
xul".
... is
xulbrowser(window) returns true if the given window is a
xul window.
Bootstrapped extensions - Archive of obsolete content
traditional extensions include overlays, wherein the application can load up
xul from the extension's package and automatically apply it on top its own ui.
... not all chrome.manifest instructions are supported in bootstrapped add-ons, for example you still cannot register
xul overlays from a bootstrapped add-on.
...
xul and html files - using entities from dtd files many times html pages are used, however they cannot be localized with dtd files.
... chrome.manifest file must include a definition for content for example: content name_of_your_addon ./ the chrome.manifest file must also include a line pointing to the locale, just like in the above property section, if you had a folder named en-us in locale, the chrome.manifest file should contain: locale name_of_your_addon en-us locale/ here is an example add-on that opens an html page and a
xul page on install: github :: l10n-xhtml-
xul.
Miscellaneous - Archive of obsolete content
eveloper.mozilla.org/samples/domref/dispatchevent.html also, new in firefox 3 / gecko 1.9: var utils = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindowutils); utils.sendmouseevent("mousedown", 10, 10, 0, 1, 0); utils.sendmouseevent("mouseup", 10, 10, 0, 1, 0); getting the currently selected text from browser.
xul overlay context: var selectedtext = document.commanddispatcher.focusedwindow.getselection().tostring(); or: content.getselection(); // |window| object is implied; i.e., window.content.getselection() or: getbrowserselection(); // |window| object is implied; i.e., window.getbrowserselection() this final option massages the selection to remove leading and trailing whitespace.
...t.selectionend, currentvalue.length); element.value = beforetext + snippet + aftertext; element.focus(); //put the cursor after the inserted text element.setselectionrange(selectionend, selectionend); } inserttext(document.getelementbyid("example"), "the text to be inserted"); disabling javascript programmatically // disable js in the currently active tab from the context of browser.
xul gbrowser.docshell.allowjavascript = false; if this isn't your browser, you should save the value and restore it when finished.
...however, if you are not going to cancel the request, you need to "rewind" it by calling: postdata.queryinterface(ci.nsiseekablestream).seek(ci.nsiseekablestream.ns_seek_set, 0); adding custom certificates to a
xulrunner application you need to ship a
xulrunner application with your own ssl certificates?
...to get the same feature for your
xulrunner application, follow those steps: first, put the certificates you want to ship into the content/certs folder of your application.
QuerySelector - Archive of obsolete content
// if you'd like to convert it to a array for convenience, use this instead: // return array.prototype.slice.call(el.queryselectorall(selector)); } alert($('#myid').id); (note that while using the firefox web console, the above functions are available automatically.) both
xul and even xml can be easily made supportable (an alternative approach to the following would be to add chromewindow.prototype or window.prototype, accessing this.document.queryselector, or following the jquery style of chaining by returning 'this' within each prototype method of $()): htmldocument.prototype.$ = function (selector) { // only for html return this.queryselector(selector); }; exa...
...mple: <h1>test!</h1> <script> htmldocument.prototype.$ = function (selector) { return this.queryselector(selector); }; alert(document.$('h1')); // [object htmlheadingelement] </script>
xuldocument.prototype.$ = function (selector) { // only for
xul return this.queryselector(selector); }; example: <label value="test!"/> <script type="text/javascript"><![cdata[
xuldocument.prototype.$ = function (selector) { // only for
xul return this.queryselector(selector); }; alert(document.$('label')); // [object
xulelement] ]]></script> document.prototype.$ = function (selector) { // only for plain xml return this.queryselector(selector); }; var foo = document.implementation.createdocument('somens', 'foo', null); // create an xml document <foo xmlns="somens"/> var bar = foo.createele...
...mentns('somens', 'bar'); // add <bar xmlns="somens"/> foo.documentelement.appendchild(bar); alert(foo.$('bar').nodename); // gives 'bar' element.prototype.$ = function (selector) { // works for html,
xul, and plain xml return this.queryselector(selector); }; html example: <h1><a>test!<a/></h1> <script> element.prototype.$ = function (selector) { return this.queryselector(selector); }; alert(document.getelementsbytagname('h1')[0].$('a').nodename); // 'a'
xul example: <hbox><vbox/></hbox> <script type="text/javascript"><![cdata[ element.prototype.$ = function (selector) { return this.queryselector(selector); }; var
xulns = 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul'; alert(document.getelementsbytagnamens(
xulns, 'hbox')[0].$('vbox').nodename); // vbox ]]></scri...
...pt> xml example: <foo xmlns="somens"><bar/></foo> in document earlier var foo = document.getelementsbytagnamens('somens', 'foo')[0]; alert(foo.$('bar')); note that for plain xml, the # 'id' selector will not work with an 'id' attribute (since a such-named attribute need not necessarily be of type id in xml, though it is in html and
xul), nor will it work with xml:id.
Sidebar - Archive of obsolete content
to open a page in the "viewwebpanelssidebar" from chrome code (browser/addon/extension) such as from menuitem, it can call: openwebpanel(atitle, auri); accessing the sidebar from a browser.
xul script the sidebar content is always in a document separate from the main browser document (the sidebar is actually implemented as a
xul browser element).
... this means you can't directly access the sidebar content from a script referenced from a browser.
xul overlay.
...for example the code below calls a function defined in the sidebar's context: var sidebarwindow = document.getelementbyid("sidebar").contentwindow; // verify that our sidebar is open at this moment: if (sidebarwindow.location.href == "chrome://yourextension/content/whatever.
xul") { // call "yournotificationfunction" in the sidebar's context: sidebarwindow.yournotificationfunction(anyarguments); } testing which sidebar is open the sidebar content may contain different panels (bookmarks, history, webpanel, etc.) and sometimes one wants to only act on the sidebar when it contains a specific panel.
... the good practice to determine which sidebar is open at a time is by testing in location property, which is a chrome url: var sidebarwindow = document.getelementbyid("sidebar").contentwindow; if (sidebarwindow.location.href == "chrome://yourextension/content/whatever.
xul") { // act on the sidebar content } for example to test if the web panel from firefox is open: var sidebarwindow = document.getelementbyid("sidebar").contentwindow; if (sidebarwindow.location.href == "chrome://browser/content/web-panels.
xul") { // act on the sidebar content only if it is the web panels } accessing the browser.
xul window from a sidebar script see accessing the elements of the top-level document from a child window section of working with windows in chrome code.
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
triggering event handlers sometimes scripts might want to manually trigger an event handler that is defined directly in the
xul document.
... consider the following
xul fragment throughout the rest of this section.
... alternative: element.click()
xul and html elements have a pre-defined .click() method that will fire a synthesized click event.
... document.getelementbyid("mybutton").click(); alternative: element.docommand()
xul elements that have a command (oncommand or command attribute) assigned will also have a working docommand method.
Extensions support in SeaMonkey 2 - Archive of obsolete content
some urls are listed below: url in firefox url in seamonkey overlays chrome://browser/content/browser.
xul chrome://navigator/content/navigator.
xul main browser window chrome://browser/content/pageinfo/pageinfo.
xul chrome://navigator/content/pageinfo/pageinfo.
xul page info window chrome://browser/content/preferences/permissions.
xul chrome://communicator/content/permis...onsmanager.
xul permissions manager dialog urls add...
...ed in 2.1 url in firefox url in seamonkey chrome://browser/content/bookmarks/bookmarkspanel.
xul chrome://communicator/content/bookmarks/bm-panel.
xul chrome://browser/content/places/places.
xul chrome://communicator/content/bookma...rksmanager.
xul thunderbird uses mostly the same chrome urls for overlaying as seamonkey.
... in javascript code you can use the following technique to detect the application: const firefox_id = "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"; const thunderbird_id = "{3550f703-e582-4d05-9a08-453d09bdfdc6}"; const seamonkey_id = "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}"; var appinfo = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsi
xulappinfo); if(appinfo.id == firefox_id) { // running under firefox } else if(appinfo.id == thunderbird_id) { // running under thunderbird } else if(appinfo.id == seamonkey_id) { // running under seamonkey } else { // another app } see using nsi
xulappinfo for more details.
...you can use the application flag to select which overlay should be used with which application: overlay chrome://browser/content/browser.
xul chrome://myaddon/content/ffoverlay.
xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} overlay chrome://messenger/content/mailwindowoverlay.
xul chrome://myaddon/content/tboverlay.
xul application={3550f703-e582-4d05-9a08-453d09bdfdc6} overlay chrome://navigator/content/navigator.
xul chrome://myaddon/content/smoverlay.
xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} ...
Drag and Drop Example - Archive of obsolete content
the user can click on one of several
xul elements on the palette and drag it onto a stack element to create an element of a particular type.
...
xul doesn't handle it and just ignores it, but we can still retrieve it with the dom's getattribute function.
...the final code is shown below: <window title="widget dragger" id="test-window" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.
xul"> <script src="chrome://global/content/nsdraganddrop.js"/> <script src="chrome://global/content/nstransferable.js"/> <script src="dragboard.js"/> <stack id="board" style="width:300px; height: 300px; max-width: 300px; max-height: 300px" ondragover="nsdraganddrop.dragover(event, boardobserver)" ondragdrop="nsdraganddrop.drop(event, boardobserver)"> </stack> ...
... session) { if (dropdata.data != "") { var elem = document.createelement(dropdata.data); event.target.appendchild(elem); elem.setattribute("left", "" + event.pagex); elem.setattribute("top", "" + event.pagey); elem.setattribute("label", dropdata.data); } } }; « previous original document information author(s): neil deakin original document: http://
xulplanet.com/tutorials/mozsdk/dragex.php copyright information: copyright (c) neil deakin ...
GRE - Archive of obsolete content
the xre project, which means "
xul runtime environment", has been replaced by
xulrunner.
...
xulrunner: the new gre
xulrunner is the new version of the gre, which not only allows embedding but is capable of bootstrapping entire
xul applications such as firefox.
...
xulrunner supports or is planned to support embedding on all three major platforms (windows, mac, and linux).
... dependent libraries and environment variables the
xulrunner gre is designed so that the embedder does not need to set any environment variables such as path or ld_library_path before calling xpcomgluestartup(), because it dynamically loads the correct dependent libraries.
Menu - Archive of obsolete content
xulid string the id of the menuitem's backing
xul element, exposed for the benefit of advanced developers.
... for example, to add an item to the tabs' context menu, try: jetpack.menu.context.browser.beforeshow = function (menu, context) { menu.reset(); if (context.node.localname === "tab") menu.add("hey, a tab!"); }; (the reason this problem exists is because document.queryselectorall() does not match anonymous content in
xul.
...a string target is case-insensitively matched against the label, id, and
xulid properties of menuitems.
... a regular expression target is tested against the label, id, and
xulid properties of menuitems.
Makefile.mozextension.2 - Archive of obsolete content
make_files: chrome.manifest install.rdf overlay.
xul overlay.js overlay.dtd $(noecho) $(noop) make_clean: rm -rf $(project) # this may be a bit too old ?!
...real_install: $(cp) chrome/$(project).jar ~/.mozilla/default/32p27fdr.slt/chrome/ #################################### ###### define chrome_manifest content $(project) content/ overlay chrome://browser/content/browser.
xul chrome://$(project)/content/overlay.
xul locale $(project) en-us locale/ skin $(project) classic/1.0 skin/ style chrome://global/content/customizetoolbar.
xul chrome://$(project)/skin/overlay.css endef export chrome_manifest chrome.manifest: @echo generating $(project)/chrome.manifest @echo "$$chrome_manifest" > $(project)/chrome.manifest ###### #firefox {ec8030f7-c20a-464f-9b0e-13a3a9e97384} #thunderbird {3550f703-e582-4d05-9a08-453d09bdfdc6} #nvu {136c295a-4a5a-41cf-bf24-5cee526720d5} #mozilla suite {86c18b42-e466-45a9-ae7a-9b95ba6f5640}...
...#"> <description about="urn:mozilla:install-manifest"> <id>$(project_id)</id> <name>$(project_name)</name> <version>$(project_version)</version> <description>$(project_desc)</description> <creator>$(project_author)</creator> <contributor>here is a place for you who helped me</contributor> <homepageurl>http://$(project).mozdev.org/</homepageurl> <optionsurl>chrome://$(project)/content/settings.
xul</optionsurl> <abouturl>chrome://$(project)/content/about.
xul</abouturl> <iconurl>chrome://$(project)/skin/mainicon.png</iconurl> <updateurl>http://$(project).mozdev.org/update.rdf</updateurl> <type>2</type> <targetapplication> <description> <id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</id> <minversion>2.0</minversion> <maxversion>9.0</maxversion> </description> </targetapplication...
...> </description> </rdf> endef export install_rdf install.rdf: @echo generating $(project)/install.rdf @echo "$$install_rdf" > $(project)/install.rdf ###### define overlay_
xul <overlay id="$(project)-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"><script src="overlay.js"/></overlay> ...
PyDOM - Archive of obsolete content
for example, let's say you have
xul similar to py
xultest: top-level script code says something like: button = document.getelementbyid("some-button") button.foo = 0 and the button itself might look like: <button id="some-button" label="click here" onclick="event.target.foo += 1; print 'foo is now', event.target.foo"/> note that (a) we have stuck an arbitrary attribute on a dom element and (b) in all cases (e.g., event han...
...
xul use a script-type attribute on your elements.
...inside chrome, you can use python via either html or
xul.
... related topics pyxpcom: create and use xpcom components with python python-spidermonkey pydom samples: sample applications that use pydom pythonext: a firefox/
xulrunner extension that can be used to install pydom ...
XBL - Archive of obsolete content
most
xul widgets are at least partially implemented using xbl.
... you can build your own reusable widgets from existing
xul, html, svg, and other primitives using xbl.
... still living "shadow dom" related specs shadow dom (editor's draft) css scoping » shadow encapsulation see also introduction to xbl from the
xul tutorial.
... custom
xul elements with xbl from the
xul school tutorial for add-on developers xbl chapter of "rapid application development with mozilla" xbl 2.0 primer (draft) xbl 2.0 cross-browser implementation in javascript more xbl resources...
Special per-platform menu considerations - Archive of obsolete content
this makes it easier to write the same
xul code for all platforms.
... here is an example: <menubar> <menu label="tools"> <menupopup> <menuitem label="spell check"/> <menuitem id="menu_preferences" label="preferences" oncommand="window.opendialog('options.
xul', '_new', 'chrome');"/> </menupopup> </menu> </menubar> this menu item will be placed on the application menu on the macintosh but left in the tools menu on other platforms.
... notes for firefox extension developers on the mac, some elements, once moved to the application menu, are no longer accessible from
xul overlays or from javascript injected into browser.
xul.
... to change these items in firefox, overlay hiddenwindow.
xul instead.
accessibleType - Archive of obsolete content
«
xul reference accessibletype type: integer a value indicating the type of accessibility object for the element.
... possible values are: constant value
xulalert 1001
xulbutton 1002
xulcheckbox 1003
xulcolorpicker 1004
xulcolorpickertile 1005
xulcombobox 1006
xuldropmarker 1007
xulgroupbox 1008
xulimage 1009
xullink 100a
xullistbox 100b
xullistcell 1026
xullisthead 1024
xullistheader 1025
xullistitem 100c
xul...
...menubar 100d
xulmenuitem 100e
xulmenupopup 100f
xulmenuseparator 1010
xulpane 1011
xulprogressmeter 1012
xulscale 1013
xulstatusbar 1014
xulradiobutton 1015
xulradiogroup 1016
xultab 1017
xultabbox 1018
xultabs 1019
xultext 101a
xultextbox 101b
xulthumb 101c
xultree 101d
xultreecolumns ...
... 101e
xultreecolumnitem 101f
xultoolbar 1020
xultoolbarseparator 1021
xultooltip 1022
xultoolbarbutton 1023 ...
Building Hierarchical Trees - Archive of obsolete content
for instance, in the photo example, we have a container 'http://www.
xulplanet.com/rdf/myphotos' with three photos.
...here is an example for the streets datasource: <tree flex="1" datasources="template-guide-streets.rdf" ref="http://www.
xulplanet.com/rdf/myneighbourhood" flags="dont-build-content" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <treecols> <treecol id="address" primary="true" label="address" flex="1"/> <treecol id="floors" label="floors" flex="1"/> </treecols> <template> <rule rdf:type="http://www.
xulplanet.com/rdf/house"> <treechildren> <treeitem uri="rdf:*"> ...
...<treerow> <treecell label="rdf:http://www.
xulplanet.com/rdf/address"/> <treecell label="rdf:http://www.
xulplanet.com/rdf/floors"/> </treerow> </treeitem> </treechildren> </rule> <rule> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://purl.org/dc/elements/1.1/title"/> </treerow> </treeitem> </treechildren> </rule> </template> </tree> the first rule is for the houses as indicated by the rule's condition and the second rule is for the streets.
... <rdf:bag rdf:about="http://www.
xulplanet.com/rdf/myneighbourhood"> <rdf:li> <rdf:seq rdf:about="http://www.
xulplanet.com/rdf/marion" dc:title="marion street"> the result is a two level tree with two columns.
Building Menus With Templates - Archive of obsolete content
here is an rdf example: <button label="houses in my neighbourhood" type="menu" datasources="template-guide-streets.rdf" ref="http://www.
xulplanet.com/rdf/myneighbourhood" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <template> <rule rdf:type="http://www.
xulplanet.com/rdf/house"> <menupopup> <menuitem uri="rdf:*" label="rdf:http://www.
xulplanet.com/rdf/address"/> </menupopup> </rule> <rule> <menupopup> <menu uri="rdf:*" label="rdf:http://purl.org/dc/elements/1.1/title...
...after the first level of the menu has been generated, the content will be equivalent to the following (ignoring the template related content): <button label="houses in my neighbourhood" type="menu"> <menupopup> <menu uri="http://www.
xulplanet.com/rdf/marion" label="marion street"/> <menu uri="http://www.
xulplanet.com/rdf/garden" label="garden avenue"/> </menupopup> </button> the inner pass through the data handles the houses.
...<button label="houses in my neighbourhood" type="menu"> <menupopup> <menu uri="http://www.
xulplanet.com/rdf/marion" label="marion street"> <menupopup> <menuitem uri="http://www.
xulplanet.com/rdf/garden/16" label="16"/> <menuitem uri="http://www.
xulplanet.com/rdf/garden/18" label="18"/> </menupopup> </menu> <menu uri="http://www.
xulplanet.com/rdf/garden" label="garden avenue"> <menupopup> <menuitem uri="http://www.
xulplanet.com/rdf/garden/2...
...5" label="25"/> <menuitem uri="http://www.
xulplanet.com/rdf/garden/37" label="37"/> </menupopup> </menu> </menupopup> </button> « previousnext » ...
Building Trees - Archive of obsolete content
to use the tree builder, you need to add a flags attribute to the root node: <tree datasources="template-guide-streets.rdf" ref="http://www.
xulplanet.com/rdf/myneighbourhood" flags="dont-build-content"> the dont-build-content flag causes no content to be built for the template.
...here is an example (using an rdf source): <tree id="photoslist" flex="1" datasources="template-guide-photos5.rdf" ref="http://www.
xulplanet.com/rdf/myphotos" flags="dont-build-content"> <treecols> <treecol id="name" label="name" flex="1"/> <treecol id="date" label="date" flex="1"/> </treecols> <template> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://purl.org/dc/elements/1.1/title"/> <treecell label="rdf:http://purl.org/dc/elements/1.1/date"/> ...
...for example: <tree id="photoslist" flex="1" datasources="template-guide-photos5.rdf" ref="http://www.
xulplanet.com/rdf/myphotos" flags="dont-build-content"> <treecols> <treecol id="photo" label="photo" flex="1"/> </treecols> <template> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell src="rdf:*"/> </treerow> </treeitem> </treechildren> </template> </tree> this tree displays each photo in the tree cells.
...<rule> <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://www.
xulplanet.com/rdf/country" object="?country"/> <triple subject="?country" predicate="http://purl.org/dc/elements/1.1/title" object="?countrytitle"/> </query> <action> <treechildren> <treeitem uri="?photo"> <treerow properties="?countrytitle"> <treecell src="?photo"/> </treerow> </treeitem> </treechildren> </ac...
Containment Properties - Archive of obsolete content
<vbox datasources="template-guide-ex1.rdf" ref="http://www.
xulplanet.com/rdf/a" containment="http://www.
xulplanet.com/rdf/relateditem"> <template> <rule> <label uri="rdf:*" value="rdf:*"/> </rule> </template> </vbox> instead of iterating over a container, this example iterates over a specific predicate.
...if the resource 'http://www.
xulplanet.com/rdf/a' was also an rdf seq with some children, then those children would also be added to the results.
...the only difference between this and the previous example is a a couple of additional lines added to the rdf/xml: <rdf:seq rdf:about="http://www.
xulplanet.com/rdf/a"> <rdf:li rdf:resource="http://www.
xulplanet.com/rdf/e"/> <rdf:li rdf:resource="http://www.
xulplanet.com/rdf/f"/> </rdf:seq> the effect is that there are five results instead of three.
...<vbox datasources="template-guide-ex3.rdf" ref="http://www.
xulplanet.com/rdf/a" containment="http://www.
xulplanet.com/rdf/relateditem"> <template> <query> <content uri="?start"/> <member container="?start" child="?child"/> </query> <action> <label uri="?child" value="?child"/> </action> </template> </vbox> try this example.
Rule Compilation - Archive of obsolete content
« previousnext » query a
xul template is made up of a query and a series of rules.
...<vbox datasources="http://www.
xulplanet.com/ds/sample.rdf" ref="http://www.
xulplanet.com/rdf/a" flex="1"> <template> <query> -- query content goes here -- </query> <rule> -- rule content goes here -- </rule> <rule> -- rule content goes here -- </rule> </template> </vbox> query/rule compilation and lazy content generation when the template builder starts processing, and after...
...for instance, consider the example below: <vbox datasources="http://www.
xulplanet.com/ds/sample.rdf" ref="http://www.
xulplanet.com/rdf/a" hidden="true"> <template> ...
...all of this is transparent to the
xul developer.
Sorting Results - Archive of obsolete content
here is a sample of how to specify this in the rdf/xml datasource: <rdf:rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:r="http://www.
xulplanet.com/rdf/" xmlns:nc="http://home.netscape.com/nc-rdf#"> <rdf:description rdf:about="http://www.
xulplanet.com/ndeakin/images/t/palace.jpg"> <r:date nc:parsetype="date">1125966767295<r:date> </rdf:description> </rdf:rdf> you can also specify parsetype="integer" for numbers which will allow sorting numerically.
...for rdf datasources, you can also use an rdf predicate for sorting instead of a variable: <hbox datasources="template-guide-photos5.rdf" sort="http://purl.org/dc/elements/1.1/title" sortdirection="ascending" ref="http://www.
xulplanet.com/rdf/myphotos"> <template> <vbox class="box-padded" uri="rdf:*"> <image src="rdf:*"/> <label value="rdf:http://purl.org/dc/elements/1.1/title"/> </vbox> </template> </hbox> in this example, the generated items will be sorted by title.
...changing the sort to change the sorting for a template's generated contents, you can either change the sort related attributes and rebuild the template, or you can call the sort method of the sort service: var listbox = document.getelementbyid("alistbox"); var sortservice = components.classes["@mozilla.org/
xul/
xul-sort-service;1"].
... getservice(components.interfaces.nsi
xulsortservice); sortservice.sort(listbox, "?gender", "descending"); this code will sort a listbox by title in a descending order.
Template and Tree Listeners - Archive of obsolete content
these each implement a different xpcom interface, as listed below: nsi
xulbuilderlistener - used to listen to template rebuilds.
... nsi
xultreebuilderobserver - used to listen to particular tree operations.
...the tree builder observer implements the nsi
xultreebuilderobserver interface and may be attached to a tree builder using the builder's addobserver method.
...ar treebuilderobserver = { candropbeforeafter : function(idx, orient) { return false; }, candropon : function(idx, orient) { return true; }, candrop : function(idx, orient) { return !orient; }, ondrop : function(idx, orient) { // do something here }, }; //tree.builderview.addobserver(treebuilderobserver); // ppchenhui@hotmail.com tree.builder.queryinterface (components.interfaces.nsi
xultreebuilder) .addobserver(treebuilderobserver); the candropbeforeafter method returns false since we do not want to allow before and after drops.
Adding Labels and Images - Archive of obsolete content
text elements you cannot embed text directly into a
xul file without tags around it and expect it to be displayed.
... you can use two
xul elements for this purpose.
...images
xul has an element to display images within a window.
...here are some examples:
xul: <image id="image1"/> <image id="search"/> style sheet: #image1 { list-style-image: url("chrome://findfile/skin/banner.jpg"); } #search { list-style-image: url("http://example.com/images/search.png"); } these images come from within the chrome directory, in the skin for the findfile package.
Creating a Skin - Archive of obsolete content
that way, we can modify the
xul without needing to keep the box as the first child of the window.
... css: .findfilesbox { background-color: #0088cc; }
xul: <vbox class="findfilesbox" orient="vertical" flex="100%"> <toolbox> rounding on the tabs next, let's modify the tabs.
...this is convenient because the skin cannot change the
xul.
... our find files example with this skin: source view stylesheet see also mozilla css extensions css reference the next section discusses how to make a
xul application localizable.
Creating a Wizard - Archive of obsolete content
xul provides a way to create wizards easily.
...
xul provides a wizard element which can be used to create wizards.
... an example wizard source <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <wizard id="example-window" title="select a dog wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <wizardpage> <description> this wizard will help you select the type of dog that is best for you." </description> <label value="why do you want a dog?"/> <menulist> <menupopup> <menuitem label="to scare people away"/> <menuitem label="to get rid of a cat"/> <menuitem label="i need a best friend"/> </menupopup> </menulist> </wiza...
...for example: <wizard id="example-window" title="select a dog wizard" onwizardfinish="return savedoginfo();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> when the user clicks the finish button, the function savedoginfo() will be called, which would be defined in a script file to save the information that was entered.
Creating an Installer - Archive of obsolete content
« previousnext » this section will describe packaging a
xul application into an installer.
... xpinstall packages mozilla provides a mechanism which can be used to package
xul windows, scripts, skins and other files into single file installers.
... function donefn ( name , result ){ if (result) alert("an error occured: " + result); } var xpi = new object(); xpi["find files"] = "findfile.xpi"; installtrigger.install(xpi,donefn); the xpi archive note: if you want to create a new
xulrunner application, extension, or theme, see bundles.
... our find files example for the find files dialog, we'll create a structure in the archive much like the following: install.js findfile content contents.rdf findfile.
xul findfile.js skin contents.rdf findfile.css locale contents.rdf findfile.dtd a directory has been added for each part of the package, the content, the skin and the locale.
Keyboard Shortcuts - Archive of obsolete content
creating a keyboard shortcut
xul provides methods in which you can define keyboard shortcuts.
... key element
xul provides an element, key, which lets you define a keyboard shortcut for a window.
... <?xml version="1.0" encoding="utf-8"?> <window xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.
xul"> <keyset> <key id="cut_cmd" modifiers="accel" key="x"/> <key id="copy_cmd" modifiers="accel" key="c"/> <key id="paste_cmd" modifiers="accel" key="v"/> <key id="close_cmd" keycode="vk_escape" oncommand="window.close();"/> </keyset> <vbox flex="1"> <toolbox> <menubar id="findfiles-menubar"> <menu id="file-menu" label="file" accesskey="f"> <menupopup id="file-popup"> ...
...if no element is focused, the key event will instead be targeted at the
xul document itself.
More Button Features - Archive of obsolete content
this is designed to allow the 'skin' (in this case, the appearance of the image) to be changed without changing the
xul file.
...in general, it can be used on all
xul elements.
...for example, the following will create a button where two of the words are red: example 4 : source view <button> <description value="this is a"/> <description value="rather strange" style="color: red;"/> <description value="button"/> </button> any
xul element may be placed inside the button.
...next, we will learn more details about how
xul elements are positioned in a window.
More Event Handlers - Archive of obsolete content
a full list is provided in the
xulplanet event reference.
...var element = event.target; var elementx = event.clientx - element.boxobject.x; var elementy = event.clienty - element.boxobject.y;
xul elements have a box object that can be retrieved using the boxobject property.
...load events the load event is sent to the document (the window tag) once the
xul file has finished loading and just before the content is displayed.
...this is because the
xul elements may not have loaded or fully initialized yet, so some things may not work as expected.
Property Files - Archive of obsolete content
properties dtd files are suitable when you have text in a
xul file.
... stringbundles you could write the code to read properties yourself, however
xul provides the stringbundle element which does this for you.
...<stringbundleset id="stringbundleset"> <stringbundle id="strings" src="strings.properties"/> </stringbundleset> including this element will read the properties from the file 'strings.properties' in the same directory as the
xul file.
... « previousnext » see also how to localize html pages,
xul files, and js/jsm files from bootstrapped add-ons: bootstrapped extensions :: localization (l10n) ...
Using multiple DTDs - Archive of obsolete content
normally you have a single dtd (document type definition) to localize a specific
xul file.
... but there are situations where you want to use multiple dtds, for example to localize common widgets used in all your
xul files, additionally to the ones specific to the file.
... single dtd to make strings in your
xul file localizable, you normally add a dtd declaration at the beginning of the file like this: <!doctype window system "chrome://myextension/locale/mainwindow.dtd"> where "window" is the local name of the document (root) element.
... assuming you have an entity called somebutton.label defined in mainwindow.dtd, you can access the entity like this: <button id="somebutton" label="&somebutton.label"> multiple dtds if you want to use multiple dtds with your
xul file, you can simply list all of the dtds inside your dtd declaration: <!doctype window [ <!entity % commondtd system "chrome://myextensions/locale/common.dtd"> %commondtd; <!entity % mainwindowdtd system "chrome://myextension/locale/mainwindow.dtd"> %mainwindowdtd; ]> you can now access the entities declared in the dtds as shown above.
colorpicker - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a palette of colors from which a user may select by clicking on one of the grid cells.
...a change event is fired in different ways for different
xul input elements as listed below: onchange type: script code textbox when enter key is pressed radio/check box when the state is changed select list when the selected item is changed what is accessible the script context at this point can only access the following things: global values/functions i.e.
... window, document, or any of the functions/objects/variables bound to the window object event object example <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <script type="text/javascript"> function myfunction(e){ /* do something cool here or just say the below */ alert(e.target.nodename); } </script> <textbox id="find-text" onchange="return myfunction(event);"/> </window> preference type: id connects the element to a corresponding preference.
...nsertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsidom
xulcontrolelement bugs the onchange event only fires if attribute type is set to "button".
grid - Archive of obsolete content
note: this page is about grids in mozilla's
xul technology.
... «
xul reference home [ examples | attributes | properties | methods | related ] a grid is a layout type that arranges elements in rows and columns.
... more information is available in the
xul tutorial.
...ue="user name"/> <textbox id="user"/> </row> <row> <label value="group"/> <menulist> <menupopup> <menuitem label="accounts"/> <menuitem label="sales" selected="true"/> <menuitem label="support"/> </menupopup> </menulist> </row> </rows> </grid> </groupbox> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
label - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element is used to provide a label for a control element.
...more information is available in the
xul tutorial.
... related elements description attributes label interfaces nsiaccessibleprovider, nsidom
xullabelelement notes labels are not focusable note: starting in gecko 2.0, labels are properly not focusable.
... they used to incorrectly inherit from nsidom
xulcontrolelement.
listitem - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a single row in a listbox.
... more information is available in the
xul tutorial.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
... related elements listbox, listcell, listcol, listcols, listhead, listheader interfaces nsiaccessibleprovider, nsidom
xulselectcontrolitemelement ...
menu - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an element, much like a button, that is placed on a menubar.
... more information is available in the
xul tutorial.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
... related elements menubar, menuitem, menulist, menupopup, menuseparator interfaces nsiaccessibleprovider, nsidom
xulcontainerelement, nsidom
xulcontaineritemelement, nsidom
xulselectcontrolitemelement ...
menulist - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an element that can be used for drop-down choice lists.
... more information is available in the
xul tutorial.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
... related elements menu, menubar, menuitem, menupopup, menuseparator interfaces nsiaccessibleprovider, nsidom
xulmenulistelement ...
menuseparator - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] used to create a separator between menu items.
... more information is available in the
xul tutorial.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...pnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements menu, menubar, menuitem, menulist, menupopup interfaces nsiaccessibleprovider, nsidom
xulcontaineritemelement, nsidom
xulselectcontrolitemelement ...
notificationbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] the notificationbox element is used to display notifications above an element.
... finding the current notification box within a firefox extension, you can retrieve the current notification box for a specific tab by calling the global function getnotificationbox(): notifybox = chromewin.getnotificationbox(notifywindow) notifybox = getnotificationbox(notifywindow) // applies to current context's window object here, chromewin is the
xul window (usually just window), and notifywindow is the web content window for the tab you want to find the notification box for.
... properties currentnotification, allnotifications, notificationshidden methods appendnotification, getnotificationwithvalue, removeallnotifications, removecurrentnotification, removenotification, removetransientnotifications, attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
...keep in mind that this is all
xul so using html elements for styling might still need additional css in order to work as you might expect.
preference - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] declares a preference that may be adjusted in a prefpane.
...a change event is fired in different ways for different
xul input elements as listed below: onchange type: script code textbox when enter key is pressed radio/check box when the state is changed select list when the selected item is changed what is accessible the script context at this point can only access the following things: global values/functions i.e.
... window, document, or any of the functions/objects/variables bound to the window object event object example <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <script type="text/javascript"> function myfunction(e){ /* do something cool here or just say the below */ alert(e.target.nodename); } </script> <textbox id="find-text" onchange="return myfunction(event);"/> </window> readonly type: boolean if set to true, then the user cannot change the value of the element.
... related preferences system documentation: introduction: getting started | examples | troubleshooting reference: prefwindow | prefpane | preferences | preference |
xul attributes ...
prefpane - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a single preference panel in a prefwindow.
...the former is specified using a preferences element while the latter may be specified using other
xul elements.
... attributes helpuri, image, label, onpaneload, selected, src properties image, label, preferenceelements, preferences, selected, src examples methods preferenceforelement <prefpane id="panegeneral" label="general" src="chrome://path/to/paneoverlay.
xul"/> or <prefpane id="panegeneral" label="general" onpaneload="ongeneralpaneload(event);"> <preferences> <preference id="pref_one" name="extensions.myextension.one" type="bool"/> ...
... </prefpane> <script type="application/javascript" src="chrome://myext/content/script0.js"> <script type="application/javascript" src="chrome://myext/content/script1.js"> </prefwindow> when opening a dialog with multiple panes you must include the toolbar feature in the call to opendialog, for example: window.opendialog("chrome://example/content/prefwin.
xul", "", "chrome,toolbar"); related prefwindow preferences system documentation: introduction: getting started | examples | troubleshooting reference: prefwindow | prefpane | preferences | preference |
xul attributes ...
radio - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an element that can be turned on and off.
... more information is available in the
xul tutorial.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...de, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements radiogroup, checkbox interfaces nsiaccessibleprovider, nsidom
xulselectcontrolitemelement, nsidom
xullabeledcontrolelement ...
radiogroup - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a group of radio buttons.
... more information is available in the
xul tutorial.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
... related interfaces nsiaccessibleprovider, nsidom
xulselectcontrolelement ...
richlistbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element is used to create a list of listitems (richlistitems), similar to a listbox, but is designed to be used when the items do not contain simple text content.
...ction, ensureelementisvisible, ensureindexisvisible, getindexoffirstvisiblerow, getindexofitem, getitematindex, getnumberofvisiblerows, getrowcount, getselecteditem, insertitemat, invertselection, movebyoffset, removeitemat, removeitemfromselection, scrolltoindex, selectall, selectitem, selectitemrange, timedselect, toggleitemselection examples <richlistbox> <richlistitem> <description>a
xul description!</description> </richlistitem> <richlistitem> <button label="a
xul button"/> </richlistitem> </richlistbox> the richlistbox element contains multiple richlistitem elements, which can contain any content.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
... related interfaces nsiaccessibleprovider, nsidom
xulmultiselectcontrolelement ...
scrollbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a box that has additional functions that can be used to scroll the content.
... examples the following shows the
xul for a bunch of labels.
... prior to gecko 19, scrollintoview() didn't exist in
xul.
... attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template,...
stack - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an element that renders its children on top of each other.
... more information is available in the
xul tutorial.
... examples <stack> <hbox flex="1"> <image src="chrome://
xulschoolhello/skin/stack-bg.png" flex="1"left="10"right="10" top="10" bottom="10"/> </hbox> <hbox> <!-- some content here.
...--> </hbox> </stack> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, to...
stringbundle - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an element which can be used to load localized resources from property files.
... more information is available in the
xul tutorial.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, s...
...haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
xul property files ...
tabbrowser - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element is used for holding a set of read-only views of web documents.
... note: starting in firefox 3 (
xulrunner/gecko 1.9), this is only used in the main firefox window and cannot be used in other
xul windows by third-party applications or extensions.
... gettabforbrowser( browser ) return type: tab returns the
xul tab which contains the specified browser.
...the properties of params are following: boolean inbackground boolean replace boolean allowthirdpartyfixup tab targettab number newindex object postdatas number usercontextid note: this is the
xul method on <browser> / <tabbrowser>, not the global function in chrome://browser/content/browser.js.
toolbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container for toolbars.
... more information is available in the
xul tutorial.
... properties accessible, customtoolbarcount, externaltoolbars, palette, toolbarset methods appendcustomtoolbar, collapsetoolbar, expandtoolbar examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" title="toolbox example" width="300"> <toolbox> <toolbar> <toolbarbutton label="back"/> <toolbarbutton label="forward"/> <toolbarbutton label="home"/> </toolbar> <toolbar> <toolbarbutton label="stop"/> <toolbarbutton label="reload"/> </toolbar> </toolbox> <textbox multiline="true" value="we have two toolbars inside of one toolbox above." width="...
...20"/> </window> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessible type: nsiaccessible returns the accessibility object for the element.
wizard - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element is used to construct a step-by-step wizard found in some applications to guide users through a task.
... more information is available in the
xul tutorial.
... canrewind, currentpage, onfirstpage, onlastpage, pagecount, pageindex, pagestep, title, wizardpages methods advance, cancel, extra1, extra2, getbutton, getpagebyid, goto, rewind examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <wizard id="thewizard" title="secret code wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <script> function checkcode(){ document.getelementbyid('thewizard').canadvance = (document.getelementbyid('secretcode').value == "cabbage"); } </script> <wizardpage onpageshow="checkcode();"> <label value="enter the secret code:"/> <textbox id="secretcode" onkeyup="checkcode();"/> </wizardpage> <wizardpage> <label value="that is the correct secret code."/> </w...
..., haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata «
xul reference home advance( pageid ) return type: no return value call this method to go to the next page.
toolkit.singletonWindowType - Archive of obsolete content
preference type: string specified by: default prefs of
xulrunner applications default: none example: pref("toolkit.singletonwindowtype", "
xulmine"); by default, the toolkit.defaultchromeuri preference will cause
xulrunner to open a new main application window each time an application is invoked.
... the toolkit.singletonwindowtype preference causes
xulrunner to search for a window with the attribute windowtype as specified in this preference (e.g.
... <window windowtype="
xulmine"> in our example).
...see also:
xulrunner:specifying startup chrome window, toolkit.defaultchromefeatures ...
Requests For Enhancement - Archive of obsolete content
natively, the mozilla xforms implementation supports xforms elements being hosted in xhtml and
xul documents.
...this section could be of particular interest to people using custom controls in
xul documents for the following reasons:
xul, in many cases, is much better suited for application development than xhtml.
... therefore the control set may need to be more extensive to address the wider spectrum of requirements that a
xul application will have on its controls.
...
xul is a feature of mozilla only and custom control authors should be aware their controls won't work on other browser platforms.
XForms Select Element - Archive of obsolete content
representations the xforms select element can be represented by the following widgets for the specified appearance attribute values: list - default representation (xhtml/
xul) check group- used when appearance = 'full' (xhtml/
xul) list displaying a listbox is the default representation (xhtml/
xul).
... characteristics analogous widgets are <html:select size="5" multiple="true"/> and <
xul:listbox seltype="multiple"/> visual grouping by choices element isn't implemented if incremental attribute value is false, the bound node is updated when the select control is blurred (i.e.
... loses focus), otherwise it is updated upon item selection check group the select is represented as group of checkboxes (xhtml/
xul).
... characteristics appearance attribute contains the value full there are no analogue widgets in xhtml or in
xul visual grouping by choices element is supported if incremental attribute value is false then bound node is updated when item is blurred examples <xf:model> <xf:instance> <data xmlns=""> <values>g</values> </data> </xf:instance> </xf:model> <xf:select ref="/data/values" appearance="full"> <xf:choices> <xf:label>green colors</xf:label> <xf:item> <xf:label>pale green</xf:label> <xf:value>pg</xf:value> </xf:item> <xf:item> <xf:label>green</xf:label> <xf:value>g</xf:value> </xf:item> </xf:choices> <xf:choices> <xf:label>red colors</xf:label> <xf:item> <xf:label>red</xf:label> <xf:value>r</xf:v...
The Firefox codebase: CSS Guidelines
using variables use the variable according to its naming do this:
xul|tab:hover { background-color: var(--in-content-box-background-hover); } not this: #certificateerrordebuginformation { background-color: var(--in-content-box-background-hover); } localization text direction for margins, padding and borders, use inline-start/inline-end rather than left/right.
... the rtl-aware equivalents of border-{top/bottom}-{left/right}-radius are border-{start/end}-{start/end}-radius when there is no special rtl-aware property available, use the pseudo :-moz-locale-dir(ltr|rtl) (for
xul files) or :dir(ltr|rtl) (for html files).
...consider using an actual <img> tag (for html documents) or list-style-image (for
xul documents) if rendering the image is important.
... layout & performance layout mixing
xul flexbox and html flexbox can lead to undefined behaviour.
Roll your own browser: An embedding how-to
you should instead build
xulrunner and use it for all new embedding.
... activestate's komodo: development environment, based on mozilla's
xul.
... activestate's komodo: development environment, based on mozilla's
xul.
... mac external projects activestate's komodo: development environment, based on mozilla's
xul.
PopupNotifications.jsm
notification getnotification( string id
xulelement browser ); parameters id the notification id to search for.
... browser the
xul <
xul:browser> element whose notifications should be searched.
... if null, the currently selected <
xul:browser>'s notifications will be searched.
... notification show( browser, id, message, anchorid, mainaction, secondaryactions, options ); parameters browser the
xul <
xul:browser> element with which the notification is associated.
about:memory
�� └──0.05 mb (00.02%) ── property-tables │ │ │ └───9.61 mb (05.01%) ++ (18 tiny) │ │ └───4.39 mb (02.29%) -- js-zone(0x7f69425b5800) │ ├──15.75 mb (08.21%) ++ top(http://techcrunch.com/, id=20) │ ├──12.85 mb (06.69%) ++ top(http://arstechnica.com/, id=14) │ ├───6.40 mb (03.33%) ++ top(chrome://browser/content/browser.
xul, id=3) │ └───3.59 mb (01.87%) ++ (4 tiny) ├───45.74 mb (23.84%) ++ js-non-window ├───33.73 mb (17.58%) ── heap-unclassified ├───22.51 mb (11.73%) ++ heap-overhead ├────6.62 mb (03.45%) ++ images ├────5.82 mb (03.03%) ++ workers/workers(chrome) ├────5.36 mb (02.80%) ++ (16 tiny) ├────4.07 mb (02.12%) ++ storage ├─�...
...for example, the "top(http://edition.cnn.com/, id=8)" sub-tree represents the tab open to cnn.com, and "top(chrome://browser/content/browser.
xul, id=3)" represents the main browser ui window.
...s (from: resource://gre/modules/addons/xpiprovider.jsm:4307)) │ ├──11,583,312 b (01.20%) ++ jid1-xufzosoflzsoxg@jetpack/js-non-window/zones/zone(0x100496800) │ ├───5,574,608 b (00.58%) -- {59c81df5-4b7a-477b-912d-4e0fdf64e5f2} │ │ ├──5,529,280 b (00.57%) -- window-objects │ │ │ ├──4,175,584 b (00.43%) ++ top(chrome://chatzilla/content/chatzilla.
xul, id=4293) │ │ │ └──1,353,696 b (00.14%) ++ top(chrome://chatzilla/content/output-window.html, id=4298) │ │ └─────45,328 b (00.00%) ++ js-non-window/zones/zone(0x100496800)/compartment([system principal], file:///users/njn/library/application%20support/firefox/profiles/puna0zr8.new/extensions/%7b59c81df5-4b7a-477b-912d-4e0fdf64e5f2%7d/components/chatzilla-servi...
... for add-ons that use
xul overlays, such as adblock plus, the memory usage of those overlays will not show up in this sub-tree; it will instead be in the non-add-on sub-trees and won't be identifiable as being caused by the add-on.
Places utilities for JavaScript
by default its only included in browser.
xul.
... warning : placesutils class since firefox 3 beta 5 has been split into: placesutils: can be used in any toolkit application placesuiutils: only in firefox placesutils this is a gigantic object full of usefulness if you need to do any bookmark work from within browser.
xul.
...its functionality has been replaced by
xulstore.
... getformattedstring() string getformattedstring(string key, array string params) parameters key the string name to get from the string bundle params strings to substitute into the bundle at designated points see
xul:stringbundle for more information.
XPCOM Glue without mozalloc
starting with
xulrunner 2.0, the frozen linkage dependent glue (xpcomglue_s.lib on windows, libxpcomglue_s.a on linux and mac) is dependent on the new infallible memory allocation routines (mozalloc).
... since these routines didn't exist prior to
xulrunner 2.0, xpcom components that link against the frozen linkage dependent glue will not be compatible with
xulrunner applications prior to 2.0.
... this library is new in
xulrunner 2.0, and it's identical to xpcomglue_s, except that it's compiled without mozalloc.
... resulting xpcom components will no longer have a dependency on mozalloc, and will thus be compatible with
xulrunner applications prior to 2.0 as well.
nsIPrintingPrompt
defaults for platform service: showprintdialog - displays a native dialog showpagesetup() - displays a
xul dialog showprogress() - displays a
xul dialog summary for windows embedders: stated once again: there is no "fallback" native platform support in gfx for the displaying of the native print dialog.
... the current default implementation for windows display a native print dialog but a
xul-based progress dialog.
...that service is capable of displaying a native print dialog and a
xul progress dialog.
... defaults for platform service: showprintdialog - displays a native dialog showpagesetup() - displays a native dialog showprogress() - displays a
xul dialog method overview void showpagesetup(in nsiprintsettings printsettings, in nsiobserver aobs); void showprintdialog(in nsiwebbrowserprint webbrowserprint, in nsiprintsettings printsettings); void showprogress(in nsiwebbrowserprint webbrowserprint, in nsiprintsettings printsettings, in nsiobserver opendialogobserver, in boolean isforprinting, out nsiwebprogresslis...
nsITreeView
layout/
xul/base/src/tree/public/nsitreeview.idlscriptable this interface is used by the tree widget to get information about what and how to display a tree widget.
... further information about creating treeviews is given in the
xul tutorial.
... selectionchanged() should be called from a
xul onselect handler whenever the selection changes.
... see also tree widget changes (applies to gecko 1.8 and later)
xul tutorial:tree view details sorting and filtering a custom tree view when working with tree views, the tree box object may also be useful
xul tutorial:tree box objects ...
customDBHeaders Preference
user_pref( "mailnews.customdbheaders", "x-superfluous x-other"); adding a column the reply-to column tutorial does a good job of explaining how to add a column with an overlay, so i'll just show you my overlay file: <?xml version="1.0" ?> <overlay id="colsuperfluousoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <script type='application/javascript' src='chrome://superfluous/content/superfluous.js'/> <tree id="threadtree"> <treecols id="threadcols"> <splitter class="tree-splitter" /> <treecol id="colsuperfluous" persist="hidden ordinal width" currentview="unthreaded" flex="1" label="superfluous" tooltiptext="click to sort by superfluous" /> </tree...
...this is the superfluous.js file referenced from within the superfluous_overlay.
xul file: dump(" ~ ~ ~ ~ superfluous ~ ~ ~ ~ \n"); var columnhandler = { getcelltext: function(row, col) { //get the messages header so that we can extract the 'x-superfluous' field var key = gdbview.getkeyat(row); var hdr = gdbview.db.getmsghdrforkey(key); var retval = hdr.getstringproperty("x-superfluous"); dump("x-superfluous: " + retval + "\n"); return retval; ...
... building the extension for this extension, i used a directory tree exactly like this: superfluous/ chrome.manifest install.rdf makefile chrome/ content/ superfluous.js superfluous_overlay.
xul here's the makefile: deps:= chrome/ \ chrome.manifest \ chrome/content/ \ chrome/content/superfluous.js \ chrome/content/superfluous_overlay.
xul \ install.rdf superfluous.xpi: ${deps} zip $@ ${deps} chrome.manifest: content superfluous chrome/content/ overlay chrome://messenger/content/messenger.
xul chrome://superfluous/content/superfluous_overlay.x...
...plication> <em:name>superfluous</em:name> <em:description>test superfluous extension</em:description> <em:creator>garrett comeaux</em:creator> </description> </rdf> build process: [gcomeaux@kyle tbird-ext]$ cd superfluous/ [gcomeaux@kyle superfluous]$ make zip superfluous.xpi chrome/ chrome.manifest chrome/content/ chrome/content/superfluous.js chrome/content/superfluous_overlay.
xul install.rdf adding: chrome/ (stored 0%) adding: chrome.manifest (deflated 44%) adding: chrome/content/ (stored 0%) adding: chrome/content/superfluous.js (deflated 57%) adding: chrome/content/superfluous_overlay.
xul (deflated 44%) adding: install.rdf (deflated 50%) end result ultimately, you want to be able to compose a message like this: and see the superfluous column displayed ...
Using Mozilla code in other projects
mozilla provides a development platform for desktop applications, called
xul, atop which you can build applications.
... building
xul applications the joy of
xul an introduction to
xul; a must read for new developers.
...
xul reference the complete reference to
xul.
...
xulrunner a mozilla runtime package that can be used to bootstrap
xul and xpcom applications with ease.
Guides - Archive of obsolete content
xul migration
xul migration guide techniques to help port a
xul add-on to the sdk.
...
xul versus the sdk a comparison of the strengths and weaknesses of the sdk, compared to traditional
xul-based add-ons.
... porting example a walkthrough of porting a relatively simple
xul-based add-on to the sdk.
tabs - Archive of obsolete content
converting to
xul tabs to convert from the high-level tab objects used in this api to the low-level
xul tab objects used in the tabs/utils api and by traditional add-ons, use the viewfor() function exported by the viewfor module.
... to convert back the other way, from a
xul tab to a high-level tab object, use the modelfor() function, exported by the modelfor module.
... here's an example converting from a high-level tab to a
xul tab and then back the other way: var { modelfor } = require("sdk/model/core"); var { viewfor } = require("sdk/view/core"); var tabs = require("sdk/tabs"); var tab_utils = require("sdk/tabs/utils"); function maphighleveltolowlevel(tab) { // get the
xul tab that corresponds to this high-level tab var lowleveltab = viewfor(tab); // now we can, for example, access the tab's content directly var browser = tab_utils.getbrowserfortab(lowleveltab); console.log(browser.contentdocument.body.innerhtml); // get the high-level tab back from the
xul tab var highleveltab = modelfor(lowleveltab); console.log(highleveltab.url); } tabs.on("ready", maphighleveltolowlevel); note that directly accessing
xul objects and web content...
Low-Level APIs - Archive of obsolete content
xul <iframe> elements) that are not displayed to the user.
... system/
xul-app information about the application on which your add-on is running.
... tabs/utils functions for working with
xul tabs and the
xul tabbrowser object.
Boxes - Archive of obsolete content
this does not happen with
xul box (or hbox and vbox) by default.
...make the box style="display: block" and the wrapping behavior will occur when the box is resized: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <hbox style="display: block"> <label value="aaa"/> <label value="bbb"/> <label value="ccc"/> <label value="ddd"/> <label value="eee"/> <label value="fff"/> <label value="ggg"/> <label value="hhh"/> <label value="iii"/> <label value="jjj"/> <label value="kkk"/> <label value="lll"/> <label value="mmm"/> <label value="nnn"/> <label value="ooo"/> <label value="ppp"/> <label value="qqq"/> <label value="rrr"/> <label val...
...this keeps the image from stretching inside the box: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <box align="start" style="display:block"> <image src="chrome://global/skin/icons/error.png" style="padding:5px"/> <textbox /> <image src="chrome://global/skin/icons/error.png" style="padding:5px"/> <button label="hello"/> <image src="chrome://global/skin/icons/error.png" style="padding:5px"/> </box> </window> ...
Drag & Drop - Archive of obsolete content
dropping files onto an
xul application it's possible to setup drag and drop events to handle dropping files from external applications or os file managers onto your
xul-based application.
... first, you need to hook up the basic drag event handlers: elem.addeventlistener("dragover", _dragover, true); elem.addeventlistener("dragdrop", _dragdrop, true); here, elem could be a window or an
xul element.
...the _dragdrop function retrieves the file uri data from the drag session and creates an array of file uris that the
xul application can use.
Embedding SVG - Archive of obsolete content
svg is an xml based makeup language and can be embedded into other markup languages, like xhtml and
xul.
....org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <body> <p>hello</p> <svg:svg version="1.1" baseprofile="full" width="150" height="150"> <svg:rect x="10" y="10" width="100" height="100" fill="red"/> <svg:circle cx="50" cy="50" r="30" fill="blue"/> </svg:svg> <p>world</p> </body> </html> embedding into
xul make sure you use the right namespace when embedding <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!--
xul and svg go here --> </window> example: <?xml version="1.0"?> <?xm...
...l-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <vbox> <label value="hello"/> <svg:svg version="1.1" baseprofile="full" width="150" height="150"> <svg:rect x="10" y="10" width="100" height="100" fill="red"/> <svg:circle cx="50" cy="50" r="30" fill="blue"/> </svg:svg> <label value="world"/> </vbox> </window> ...
On page load - Archive of obsolete content
this article is for
xul/javascript developers who want to have custom code executed each time a new page is loaded in browser/mail.
... creating an overlay first, you need to create an overlay to one (or more, depending on which applications you target) of the following
xul documents: application uri to overlay firefox chrome://browser/content/browser.
xul thunderbird chrome://messenger/content/messenger.
xul navigator from seamonkey chrome://navigator/content/navigator.
xul attaching a script attach a script to your overlay (see "attaching a script to an overlay") that adds a load event listener to appcontent el...
...n.href.search("forum") > -1) alert("a forum page is loaded"); // add event listener for page unload aevent.originaltarget.defaultview.addeventlistener("unload", function(event){ myextension.onpageunload(event); }, true); }, onpageunload: function(aevent) { // do something } }; current firefox trunk nightlies will fire the onpageload function for not only documents, but
xul:images (favicons in tabbrowser).
Scrollbar - Archive of obsolete content
this example shows how to style the scrollbars in your
xul application.
... example assumes a structure like this: app/chrome/chrome.manifest app/chrome/skin/global/ copy the scrollbars.css from
xulrunner/chrome/classic.jar/skin/classic/global to app/chrome/skin/global/scrollbars.css open the app/chrome/chrome.manifest and add: skin app-global standard/1.0 skin/global/ override chrome://global/skin/
xulscrollbars.css chrome://app-global/skin/scrollbars.css
xulscrollbars.css are used for windows xp, and nativescrollbars.css on osx.
... example
xul window: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="samplewindow" width="320" height="240" xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.
xul"> <hbox flex="1"> <browser type="content" src="http://mozilla.org" flex="1"/> <scrollbar orient="vertical"/> </hbox> </window> ...
Extension Packaging - Archive of obsolete content
extensions use a directory structure which can provide chrome, components, and other files to extend the functionality of an
xul program.
...(firefox 1.5/
xulrunner 1.8 required.) from the release of firefox 53, multiple item extension packages are no longer supported and will not load.
... official references for toolkit api structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and
xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis
xul application packaging: specific information about how to package
xulrunner applications chrome registration printing in
xul apps ...
Extension Etiquette - Archive of obsolete content
about dialogs there is a default popup about dialog that is created from install.rdf data; creating a new
xul about box is usually unnecessary.
... theming if you have
xul buttons in your extension that do functions similar to ones that already exist in a browser — for example, a feed reader that reloads and stops — use icons from the browser's theme.
... ids and class names in html and
xul documents, when extensions add elements to web pages or browser windows.
Interaction between privileged and non-privileged pages - Archive of obsolete content
in your extension's browser.
xul overlay, write code which listens for a custom dom event.
...ri property, or as per the dom specification, use initevent() with an event name that is itself namespaced (xml name characters only): "it is also strongly recommended that third parties adding their own events use their own prefix to avoid confusion and lessen the probability of conflicts with other new events.") in the case where your extension's overlay does not interact directly with browser.
xul, such as in a sidebar, it might be easier to add the event listener to the top-level document directly as shown below (also see: accessing the elements of the top-level document from a child window).
...ton> <button onclick="return something.send_request({baz: 3}, something.callback)">send {baz: 3} with callback</button> <button onclick="return something.send_request({mozilla: 3})">send {mozilla: 3} without callback</button> <button onclick="return something.send_request({firefox: 4}, something.callback)">send {firefox: 4} with callback</button> </body> </html> overlay on browser.
xul in your extension: var something = { listen_request: function(callback) { // analogue of chrome.extension.onrequest.addlistener document.addeventlistener("something-query", function(event) { var node = event.target; if (!node || node.nodetype != node.text_node) return; var doc = node.ownerdocument; callback(json.parse(node.nodevalue), doc, function(response...
Getting Started with Firefox Extensions - Archive of obsolete content
extension contents you may have noticed that the extension file you installed is named
xulschoolhello1.xpi.
...issue the following command to unzip the file on linux or mac os x: unzip
xulschoolhello1.xpi -d
xulschoolhello1 on windows, you can change the file extension from xpi to zip, or open the file directly, then unzip it, using a zip tool.
... you should see the following directory structure:
xulschoolhello1 chrome.manifest install.rdf content browseroverlay.
xul browseroverlay.js skin browseroverlay.css locale en-us browseroverlay.dtd browseroverlay.properties that's lots of files for something so simple!
Overlay extensions - Archive of obsolete content
this page contains links to documentation for the approach to developing extensions for gecko-based applications which uses:
xul overlays to specify the interface apis available to privileged code, such as tabbrowser and javascript modules, to interact with the application and content.
...
xul school
xul school is a comprehensive add-on development tutorial, focusing on firefox extension development but mostly applicable to other gecko-based applications.
...
xul tutorials and reference for the user interface language used by
xul extensions.
Firefox addons developer guide - Archive of obsolete content
rules: file and directory names: italic method and variable names: class name if you want to add a fixme, add: fixme: a message notes: the original document is in japanese and distributed via the
xuldev.org website.
... so there may be still some reference to the
xuldev website (we want to host source code on mdc, not on
xuldev), and to japanese things (like some specific locales, which have been translated to french since non-latin characters are not well supported).
...see the
xul reference, for example.
Automated testing tips and tricks - Archive of obsolete content
todo: check example code in to the tree somewhere how to quit the browser on all platforms window.close() of the last open window does not quit the application on mac http://people.mozilla.com/~davel/scripts/ - look at quit.js and quit.
xul install manifest file in appdir/chrome to map chrome://tests/content to directory containing quit.js and quit.
xul example: content tests file:///users/davel/work/tests/ start app with command line flag -chrome chrome://tests/content/quit.
xul how to create a new profile from the command line first, use the -createprofile command line flag to add a profile entry to profiles.ini and populate the new profile directory with a prefs.js file firefox-bin -createprofile "testprofile ${prof...
...ile_dir}/testprofile" next, start firefox to populate the new profile directory with the rest of the default settings firefox-bin -p testprofile -chrome chrome://tests/content/quit.
xul<code> the above process may exit before the profile is completely created.
... in test scripts, <code>sleep 5 after the above command should ensure the profile is created before the next command in the test script is run how to enable dump in a new profile add user_pref("browser.dom.window.dump.enabled", true); to profiledir/user.js how to execute test code with chrome privileges using a chrome doc - see sbtests.
xul in http://people.mozilla.com/~davel/scripts/ for an example firefox-bin -p sbtestprofile -chrome chrome://sbtests/content/ above code calls the quit function in quit.js to exit after test is finished how to detect content onload event from chrome use the domcontentloaded event chromewindow.addeventlistener('domcontentloaded',callbackfunction,false); ...
Structure of an installable bundle - Archive of obsolete content
xulrunner applications, extensions, and themes all share a common directory structure, and in some cases the same bundle can be used as a standalone
xulrunner application as well as an installable application extension.
....7) /defaults/preferences/*.js default preferences (>=1.7) /plugins/* npapi plugins (>=1.8) /chrome/icons/default/* window icons (>=1.8) /icon.png extension icon, for display in the add-ons manager, 32px × 32px (>=1.9.2) /icon64.png extension icon, for display in the add-ons manager, 64px × 64px (>=2.0) /options.
xul extension options, for display in the add-ons manager (>=7.0) ...
... official references for toolkit api structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and
xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis
xul application packaging: specific information about how to package
xulrunner applications chrome registration printing in x...
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
copy the following files into the content sub-subdirectory: tinderstatusoverlay.
xul tinderstatus.js tinderstatus.css tb-busted.png tb-nostatus.png tb-success.png tb-testfailed.png these are the files we're going to put into the xpi.
... we need to change some urls in the copy of tinderstatusoverlay.
xul to point to the new locations the files will be in when they get installed via the xpi: <?xml version="1.0"?> <?xml-stylesheet href="chrome://tinderstatus/content/tinderstatus.css" type="text/css"?> <overlay id="tinderstatusoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <script type="application/javascript" src="chrome://tinderstatus/content/tinderstatus.js" /> <statusbar id="status-bar"> <statusbarpanel class="statusbarpanel-iconic" id="tinderbox-status" insertbefore="offline-status" status="none"/> </statusbar> </overlay> we also need to change the urls in the copy of tinderstatus.css: statusbarpanel#tinderbox-status { list...
...scription about="urn:mozilla:package:tinderstatus" chrome:displayname="mozilla tinderstatus extension" chrome:author="myk melez" chrome:name="tinderstatus" chrome:extension="true" chrome:description="displays tinderbox status for the mozilla codebase."> </rdf:description> <rdf:seq about="urn:mozilla:overlays"> <rdf:li resource="chrome://navigator/content/navigator.
xul"/> </rdf:seq> <rdf:seq about="chrome://navigator/content/navigator.
xul"> <rdf:li>chrome://tinderstatus/content/tinderstatusoverlay.
xul</rdf:li> </rdf:seq> </rdf:rdf> install.js, on the other hand, goes into the tinderstatus-installer directory: initinstall( "mozilla tinderstatus extension", "/mozdev/tinderstatus", "0.1"); var installdir = getfolder("chrome","tinderstatus"...
In-Depth - Archive of obsolete content
other sites which list mozilla specific css properties
xulplanet.com [dead link, 26.03.13] mozilla-prefixed properties on the standard track 26.03.13 -moz-appearance makes a widget look like it's from your operating system.
...selected in the tree view will be
xul:toolbarbutton.
...then it contains a
xul:hbox with the class .toolbar-holder.
Building Firefox with Rust code - Archive of obsolete content
the build system will generate a special 'rust unified library' crate, compiled to a static library (libgkrust.a) which is in turn linked into
xul, so all public symbols will be available to c++ code.
... if you have new rust libraries that code in lib
xul calls directly, then you should add the appropriate extern crate lines in toolkit/library/rust/shared/lib.rs, and add those libraries (crates) as dependencies in toolkit/library/rust/cargo.toml.
... the build system will check that there's only one copy of a given crate in a build; this was a deliberate decision to try and avoid code bloat in lib
xul.
Layout System Overview - Archive of obsolete content
note that lines may contain only inline elements, whereas block may contain both inline elements and other blocks.other layout models:
xul in addition to managing css-defined formatting, the layout system provides a way to integrate other layout schemes into the presentation.
... currently layout supports the formatting of
xul elements, which utilize a constraint-based layout language.
...layout deals with frames, but as long as the layout system being considered has no need to influence presentational elements from other layout systems, it can be adapted using a frame-based adapter, ala
xul.
Build - Archive of obsolete content
to build prism, you must first build the
xulrunner tree, and then build prism.
...the contents of the file should look something like this : mk_add_options moz_co_project=
xulrunner mk_add_options moz_objdir=@topsrcdir@/mozilla-obj ac_add_options --enable-application=
xulrunner ac_add_options --disable-debug ac_add_options --enable-optimize ac_add_options --disable-tests ac_add_options --disable-javaxpcom build
xulrunner : make -f client.mk build once the build is done, there will be a directory called mozilla-obj.
... go into the prism/ directory and create a .mozconfig file mk_add_options moz_objdir=@topsrcdir@/mozilla-obj/prism ac_add_options --with-lib
xul-sdk=../dist ac_add_options --enable-application=prism you need to define an environment variable to point the build to the new .mozconfig.
FAQ - Archive of obsolete content
how is prism different from
xulrunner?
... prism is built on top of
xulrunner.
... prism is a simple
xulrunner application with the main portion of the ui consisting of a
xul <browser> element.
dir - Archive of obsolete content
«
xul reference home dir type: one of the values below the direction in which the child elements of the element are placed.
... normal for scales, the scale's values are ordered from left to right (for horizontal scales) or from top to bottom (for vertical scales) for other elements, the elements are placed left to right or top to bottom in the order they appear in the
xul code.
...this is reverse of the order in which they appear in the
xul code.
onchange - Archive of obsolete content
«
xul reference home overview an onchange attribute is an event listener to the object for the event change.
... a change event is fired in different ways for different
xul input elements as listed below: onchange type: script code textbox when enter key is pressed radio/check box when the state is changed select list when the selected item is changed what is accessible the script context at this point can only access the following things: global values/functions i.e.
... window, document, or any of the functions/objects/variables bound to the window object event object example <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <script type="text/javascript"> function myfunction(e){ /* do something cool here or just say the below */ alert(e.target.nodename); } </script> <textbox id="find-text" onchange="return myfunction(event);"/> </window> ...
orient - Archive of obsolete content
«
xul reference home orient type: one of the values below used to specify whether the children of the element are oriented horizontally or vertically.
... horizontal child elements of the element are placed next to each other in a row in the order that they appear in the
xul source.
... vertical child elements of the element are placed under each other in a column in the order that they appear in the
xul source.
Deprecated and defunct markup - Archive of obsolete content
{many elements on this page are wrongly marked as deprecated, this page needs review} the following
xul tags and attribute should be considered deprecated, if not defunct.
...tbox>) <thumb> (<button> with deprecated <gripper>; implements sliding box in center of scrolbar) <title> (to add a caption on a <titledbox> <titledbox> (box with a frame) <titledbutton> (attempt to combine text and images before <button>) <toolbarpaletteitem> required to embed non-buttons in customisable toolbars --neil 03 march 2011 <treebody> (old/experimental and unsupported
xul tags) lives on as the internal name for the ancestor <treechildren> element --neil 03 march 2011 <treecaption> (old/experimental and unsupported
xul tags) <treecolgroup> (former name for <treecols> <treecolpicker> (internal use only; part of xbl for <tree>) <treefoot> (old/experimental and unsupported
xul tags) <treeindentation> (old/experimental and unsupported
xul tags) was a par...
...t of the old <tree> that predated <outliner> that was not converted to <listbox>--neil 03 march 2011 <treeicon> (old/experimental and unsupported
xul tags) <treerows> (internal use only; part of xbl for <tree>) attributes @debug="true" provided struts and springs around boxes to facilitate identification of flex issues but does not seem to work now you need a special debug_layout build --neil 03 march 2011 references
xul element reference by neal deakin rapid application development with mozilla, by nigel mcfarlane ...
Bindings - Archive of obsolete content
<rdf:description rdf:about="http://www.
xulplanet.com/ndeakin/images/t/palace.jpg" dc:title="palace from above"/> dc:description="view from the top of the tower looking east of the doges palace"/> if you try a full example based on this data, you will notice that only one result has been generated.
...(?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/palace.jpg, ?title = 'palace from above') (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/canal.jpg, ?title = 'canal') (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/obelisk.jpg, ?title = 'obelisk') the second triple will add a ?description for the first photo, adding a fourth variable-value pair to the existing data.
...(?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/palace.jpg, ?title = 'palace from above', ?description = 'view from the top of the tower looking east of the doges palace') thus, only one match exists, so only one set of content is generated.
Multiple Rule Example - Archive of obsolete content
<vbox id="photoslist" align="start" datasources="template-guide-photos5.rdf" ref="http://www.
xulplanet.com/rdf/myphotos"> <template> <rule> <conditions> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/description" ...
...the resulting data will be: (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/palace.jpg, ?title = palace from above ?description = view from the top of the tower looking east of the doges palace, ?date = 2005-04-30t14:55:00+01.00) (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/palace.jpg, ?phototitle = palace from above) (?start = http://ww...
...w.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/canal.jpg, ?phototitle = canal) (?start = http://www.
xulplanet.com/rdf/myphotos, ?photo = http://www.
xulplanet.com/ndeakin/images/t/obelisk.jpg, ?phototitle = obelisk) the first result matches the first rule and contains variables for the two additional predicates that were examined in the conditions.
Using Multiple Queries to Generate More Results - Archive of obsolete content
if we add the following data about people to the neighbourhood datasource: <rdf:description rdf:about="http://www.
xulplanet.com/rdf/myneighbourhood"> <r:people> <rdf:seq> <rdf:li rdf:resource="http://www.
xulplanet.com/rdf/person/1"/> <rdf:li rdf:resource="http://www.
xulplanet.com/rdf/person/2"/> </rdf:seq> </r:people> </rdf:description> <rdf:description rdf:about="http://www.
xulplanet.com/rdf/person/1" dc:title="nathan"/> <rdf:description rdf:about="...
...http://www.
xulplanet.com/rdf/person/2" dc:title="karen"/> we can then use two queries to generate results from different parts of the datasource.
..."/> <member container="?start" child="?item"/> </query> <rule> <binding subject="?item" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <action> <label uri="?item" value="?title" class="header"/> </action> </rule> </queryset> <queryset> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.
xulplanet.com/rdf/people" object="?people"/> <member container="?people" child="?item"/> </query> <rule> <binding subject="?item" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <action> <label uri="?item" value="?title"/> </action> </rule> </queryset> </template> you can view the example.
Template Guide - Archive of obsolete content
basics of
xul templates introduction rule compilation rdf template syntax result generation rdf query syntax actions recursive generation simple example bindings additional navigation filtering static content simple query syntax containment properties xml template syntax xml templates xml assignments sql template syntax sqlite templates common template syntax attribute substitution multiple rules using recursive templates building menus with templates special condition tests multiple queries using multiple queries to generate more results building trees with templates building trees building hierarchical trees template modifications template builder interface template and tree listeners rdf modifications additional topics sort...
...ing results additional template attributes template logging xml namespaces alternative approaches javascript templates
xuljsdatasource: a component for extensions, which bring a "javascript template syntax".
... it allows to use javascript objects as a data source for
xul templates.
Toolbars - Archive of obsolete content
toolbars, implemented using the
xul toolbar element, are containers for toolbar buttons and other user interface objects.
... documentation
xul school: adding toolbars and toolbar buttons a helpful tutorial to creating toolbars and toolbar buttons.
... related topics
xul, themes, developing mozilla ...
Tree Widget Changes - Archive of obsolete content
this describes changes in
xul trees api for gecko 1.8.
... there are no changes to
xul tree tags, however the id attribute is no longer required on treecol elements just to get them to work.
...both the nsitreecolumn and nsitreecolumns interfaces can be found at layout/
xul/base/src/tree/public/nsitreecolumns.idl.
Element Positioning - Archive of obsolete content
note that the css global skin of the
xul application may also specify a min-width for the buttons and other elements, thus if simply setting the width property does not set the button width as you expect, try also to modify the button min-width property.
...the following example demonstrates this: example 2 : source view <window orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <hbox> <button label="yes" flex="1"/> <button label="no"/> <button label="i really don't know one way or the other"/> </hbox> </window> the window will initially appear like in the image earlier.
... example 5: source view <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yesno" title="question" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <hbox> <button label="yes"/> <button label="no"/> </hbox> <hbox align="center"> <button label="maybe"/> <button label="perhaps"/> </hbox> </window> you can also use the style properties -moz-box-pack and -moz-box-align instead of specifying attributes.
Features of a Window - Archive of obsolete content
just create a second
xul file with the window code in it.
... for example: var mywin = window.open("chrome://findfile/content/findfile.
xul", "findfile", "chrome"); specifying the width and height you should have noticed that whenever elements were added to a window, the window's width expanded to fit the new elements.
... <window id="findfile-window" title="find files" width="400" height="450" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> in this example, the window will open with a width of 400 pixels and a height of 450 pixels.
Popup Menus - Archive of obsolete content
xul also has the capability of creating popup menus.
... creating a popup menu
xul has three different types of popups, described below.
...popups can only be associated with
xul elements; they cannot be associated with html elements.
Simple Menu Bars - Archive of obsolete content
creating a menu
xul has a number of different ways of creating menus.
...the menu features of
xul consist of a number of different elements which allow you to create menu bars or popup menus.
...
xul does have some special elements which provide special functionality typical of menus.
The Box Model - Archive of obsolete content
« previousnext » in this section, we'll look at how
xul handles layout.
... introduction to boxes the main form of layout in
xul is called the 'box model'.
...although a box is the fundamental part of
xul element layout, it follows a few very simple rules.
arrowscrollbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a box which provides scroll arrows along its edges for scrolling through the contents of the box.
... more information is available in the
xul tutorial.
...ox orient="vertical" flex="1"> <button label="red"/> <button label="blue"/> <button label="green"/> <button label="yellow"/> <button label="orange"/> <button label="silver"/> <button label="lavender"/> <button label="gold"/> <button label="turquoise"/> <button label="peach"/> <button label="maroon"/> <button label="black"/> </arrowscrollbox> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
assign - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] for xml templates, specifies an additional variable to assign a value to.
... var type: string for the
xul assign attribute, this is the variable to assign the value to; otherwise it's a reference to a template variable such as "?name".
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidt...
box - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of child elements.
... more information is available in the
xul tutorial.
... examples <box orient="horizontal"> <label value="zero"/> <box orient="vertical"> <label value="one"/> <label value="two"/> </box> <box orient="horizontal"> <label value="three"/> <label value="four"/> </box> </box> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, ...
broadcaster - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a broadcaster is used when you want multiple elements to share one or more attribute values, or when you want elements to respond to a state change.
... more information is available in the broadcasters and observers
xul tutorial.
... examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hid...
broadcasterset - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container element for broadcaster elements.
... more information is available in the
xul tutorial.
... examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hid...
checkbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an element that can be turned on and off.
... more information is available in the
xul tutorial.
...tnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider, nsidom
xulcheckboxelement ...
column - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a single column in a columns element.
... more information is available in the
xul tutorial.
... attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, heig...
columns - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] defines the columns of a grid.
... more information about columns is available in the
xul tutorial.
... attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, heig...
command - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a command element can be used to invoke an operation that can come from multiple sources.
... more information is available in the
xul tutorial.
...haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related
xul:list of commands ...
conditions - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element should appear directly inside a rule element and is used to define conditions for the rule.
... more information is available in the
xul tutorial.
... examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hid...
content - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] Éste elemento debería pertenecer a query ("consulta").
...para más información, se encuentra disponible el tutorial
xul.
... propiedades tag, uri ejemplos (no son necesarios) atributos inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width propiedades tag type: tag name this may be set to a tag name.
datepicker - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a datepicker allows the user to enter a date.
...in
xul, the value attribute may be set to a value of the form yyyy-mm-dd to initialize the datepicker to a certain date.
...nsertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsidom
xulcontrolelement ...
deck - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an element that displays only one of its children at a time.
... more information is available in the
xul tutorial.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
description - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element is used to create a block of text.
... more information is available in the
xul tutorial.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
dialog - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element should be used in place of the window element for dialog boxes.
... more information is available in the
xul tutorial and dialogs and prompts (code snippets).
..., buttonpack, buttons, defaultbutton, title properties buttons, defaultbutton methods acceptdialog, canceldialog, centerwindowonscreen, getbutton, movetoalertposition examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" buttons="accept,cancel" buttonlabelcancel="cancel" buttonlabelaccept="save"> <dialogheader title="options" description="my preferences"/> <groupbox> <caption label="colour"/> <radiogroup> <radio label="red"/> <radio label="green" selected="true"/> <radio label="blue"/> </radiogroup> <label value="nickname"/> <textbox/> </groupbox> </dialog> at...
editor - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a frame which is expected to contain an editable document.
...however, an issue is that if you specify the src attribute initially on the editor tag in the
xul file, the document does not become editable by default.
...
xul applications loaded via a url from a web server will not be able to access most of the features of the editor.
grippy - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an element that may be used inside a splitter which can be used to collapse a sibling element of the splitter.
... more information is available in the
xul tutorial.
... examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hid...
groupbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] the groupbox is used to group related elements together.
... more information is available in the
xul tutorial.
... properties accessibletype examples <groupbox> <caption label="settings"/> <radiogroup> <radio label="black and white"/> <radio label="colour"/> </radiogroup> <checkbox label="enabled"/> </groupbox> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
hbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of child elements.
... more information is available in the
xul tutorial.
... example <!-- two button on the right --> <hbox> <spacer flex="1"/> <button label="connect"/> <button label="ping"/> </hbox> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , ...
image - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] summary an element that displays an image, much like the html img element.
... more information is available in the
xul tutorial.
... interfaces nsiaccessibleprovider nsidom
xulimageelement ...
keyset - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container element for key elements.
... more information is available in the
xul tutorial.
... attributes disabled examples <keyset> <key id="sample-key" modifiers="shift" key="r"/> </keyset> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width disabled type: boolean indicates whether the element is disabled or not.
listbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element is used to create a list of items where one or more of the items may be selected.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
... related elements listcell, listcol, listcols, listhead, listheader, listitem interfaces nsiaccessibleprovider, nsidom
xulmultiselectcontrolelement ...
member - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] used within a rule's conditions element to match elements that are containers or are contained within another element.
... more information is available in the
xul tutorial.
... properties child, container examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties child type: ?
menupopup - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container used to display the contents of a popup menu.
... more information is available in the
xul tutorial and popup guide.
... related elements menu, menubar, menuitem, menulist, menuseparator interfaces nsiaccessibleprovider, nsidom
xulpopupelement ...
observes - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] the observes element can be used to listen to a broadcaster and receive events and attributes from it.
... more information is available in the
xul tutorial.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
panel - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a panel is a used as a temporary floating popup window that may contain any type of content.
... id="thepanel"> <hbox align="start"> <image src="warning.png"/> <vbox> <description value="you have 6 new messages."/> <hbox> <button label="read mail"/> <button label="new message"/> </hbox> </vbox> </hbox> </panel> <description value="6 new messages" popup="thepanel"/> attributes backdrag type: boolean setting the backdrag attribute on a
xul panel lets the user move the panel by clicking and dragging anywhere on its background area.
... related interfaces nsiaccessibleprovider, nsidom
xulpopupelement ...
popupset - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container for menupopup, panel and tooltip elements.
... more information is available in the
xul tutorial.
... examples <popupset> <menupopup id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </popupset> <label value="right click for popup" context="clipmenu"/> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
preferences - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] overview <preferences> is a container for <preference> elements.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
...yselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related preferences system documentation: introduction: getting started | examples | troubleshooting reference: prefwindow | prefpane | preferences | preference |
xul attributes ...
progressmeter - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a meter which can be used to display the progress of a lengthy operation.
... more information is available in the
xul tutorial.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
resizer - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an element used for window resizing.
... attributes dir, element, type examples resizing a window <window xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.
xul" hidechrome="true" windowtype="main" orient="vertical" sizemode="normal" width="400" height="300" persist="screenx screeny width height"> <hbox flex="1"> <vbox width="2" style="background-color: grey;"> <resizer dir="topleft" height="2" style="cursor: nw-resize;"/> <resizer dir="left" flex="1" style="cursor: w-resize;"/> <resizer dir="bottomleft" height="2" style="cursor: sw-res...
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
richlistitem - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an individual item in a richlistbox.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
...tnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider, nsidom
xulselectcontrolitemelement ...
row - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a single row in a rows element.
... more information is available in the
xul tutorial.
... attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, heig...
rows - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] defines the rows of a grid.
... more information is available in the
xul tutorial.
... attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, heig...
script - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] much like the html script element, this is used to declare a script to be used by the
xul window.
... more information is available in the
xul tutorial.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
spacer - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an element that takes up space but does not display anything.
... more information is available in the
xul tutorial.
... examples <box> <button label="left"/> <spacer flex="1"/> <button label="right"/> </box> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contex...
tab - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a single tab which should be placed inside a tabs element.
... more information is available in the
xul tutorial.
... interfaces nsiaccessibleprovider, nsidom
xulselectcontrolitemelement ...
tabpanel - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a individual panel in a tabpanels element.
... more information is available in the
xul tutorial.
... examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hid...
tabpanels - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container to hold the set of pages in a tabbox.
... more information is available in the
xul tutorial.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width ...
tabs - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a row of tabs.
... more information is available in the
xul tutorial.
... interfaces nsiaccessibleprovider, nsidom
xulselectcontrolelement ...
template - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] used to declare a template for rule-based construction of elements.
... more information is available in the
xul tutorial.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
titlebar - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] boxes created with the titlebar element behave just like a normal window titlebar: when the element is clicked and dragged, the window moves with it.
... examples this
xul file will create a hud-style window that can be moved with the mouse.
... <?xml version="1.0"?> <window title="movable hud window" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" width="300" height="200" style="background: transparent; -moz-appearance: none;"> <titlebar flex="1" oncommand="close()" style="background: rgba(30, 30, 30, 0.9); -moz-border-radius: 10px; -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); margin: 8px 12px 16px;"/> </window> it can be opened from the error console like this: open("file:///users/markus/sites/hudwindow.
xul", "", "chrome=1, titlebar=0") attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, ...
toolbargrippy - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] not in firefox the notch on the side of a toolbar which can be used to collapse and expand it.
... more information is available in the
xul tutorial.
... properties accessible examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessible type: nsiaccessible returns the accessibility object for the element.
treecell - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a single cell in a tree.
... more information is available in the
xul tutorial.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
treechildren - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element is the body of the tree.
... more information is available in the
xul tutorial.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, toolt...
treecol - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a column of a tree.
... more information is available in the
xul tutorial.
... copy and paste the code above and link the css file to your
xul file.
treecols - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a group of treecol elements.
... more information is available in the
xul tutorial.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties acc...
treerow - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a single row in a tree.
... more information is available in the
xul tutorial.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cur...
triple - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a triple can be included inside a rule's conditions element.
... more information is available in the
xul tutorial.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
vbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of child elements.
... more information is available in the
xul tutorial.
... example <!-- two labels at bottom --> <vbox> <spacer flex="1"/> <label value="one"/> <label value="two"/> </vbox> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classnam...
Components - Archive of obsolete content
adding components to
xulrunner is simple once you understand how
xulrunner registers and saves the components.
... place after a new component has been written it must be placed in the app/components/ directory (not
xulrunner/components/).
...alternatively, you can delete compreg.dat and xpti.dat in the user profile directory - that of your
xulrunner app, not that of firefox/mozilla.
Extentsions FAQ - Archive of obsolete content
these two links should give you a starting point: http://www..
xulplanet.com/tutorials/...u/advmenu.html http://www.
xulplanet.com/tutorials/x...dommodify.html request for a thunderbird extension that can automatically detect the default domain when composing e-mails via autodetect.
... the problem with most js frameworks is that they bootstrap by dynamically appending script elements, which doesn't work in
xul, last i checked.
...if you turn off the
xul cache you don't even need to restart to see changes, simply open a new window.
2006-10-20 - Archive of obsolete content
this is a
xulrunner 1.8.0.4 application.
... started wed, oct 18 2006 9:38 am - a
xulrunner developer, frank, discusses his desire to make
xul/browser based applications.
...nickolay ponomarev, benjamin smedberg, axel hecht clarify some misconceptions about front-end and back-end programming with
xulrunner, including the difficulty of writing the backends in c++ (since that would require a recompilation on every platform frank wanted to support).
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.tech.
xul - nov 11-nov 17, 2006 return to mozilla-dev-tech-
xul announcements processing instructions are now added to
xul document's dom on november 12, 2006, nickolay ponomarev announces the results of the recently fixed bug 319654.
... the result of the bug fix is that you may no longer use document.firstchild in
xul scripts.
... for a summary of the changes and workarounds, read nickolay's post in the mozilla.dev.tech.
xul newsgroup.
Updating an extension to support multiple Mozilla applications - Archive of obsolete content
as you may (or may not) recall, that file tells the application what
xul code your extension's interface needs to overlay onto.
... for firefox, we overlaid onto browser.
xul, which describes a firefox browser window.
... we need to add lines to the manifest for thunderbird and sunbird, like this: # thunderbird overlay chrome://messenger/content/messenger.
xul chrome://stockwatcher2/content/stockwatcher2.
xul # sunbird overlay chrome://calendar/content/calendar.
xul chrome://stockwatcher2/content/stockwatcher2.
xul these lines cause the main thunderbird message list window and the main window in sunbird to be the target of the overlays we apply in the stockwatcher2.
xul file.
Mozilla XForms User Interface - Archive of obsolete content
currently xforms can be hosted by xhtml and
xul in seamonkey and firefox.
...if you see xhtml/
xul then it means the control is available when xforms is hosted in either xhtml or
xul.
... similarly, if you see xhtml only or
xul only, then it means the control is available only in that host language.
Software accessibility: Where are we today?
mozilla developers follow the general front-end accessibility requirements: there are a number of potential "gotchas" when developing
xul ui.
... please follow the practical techniques put forth listed in the accessible
xul authoring guidelines.
... ensure correct keyboard accessibility when developing new controls: mozilla's
xul and html widgets already support proper keyboard accessibility, so let's not regress in that area.
How Mozilla's build system works
for example, there is a tier for the netscape portable runtime (nspr), one for the javascript engine, one for the core gecko platform, one for the
xul app being built, and so on.
... $(dist)/lib/$(lib_prefix)gkhtmlbase_s.$(lib_suffix) \ $(dist)/lib/$(lib_prefix)gkhtmldoc_s.$(lib_suffix) \ $(dist)/lib/$(lib_prefix)gkhtmlforms_s.$(lib_suffix) \ $(dist)/lib/$(lib_prefix)gkhtmlstyle_s.$(lib_suffix) \ $(dist)/lib/$(lib_prefix)gkhtmltable_s.$(lib_suffix) \ $(dist)/lib/$(lib_prefix)gk
xulbase_s.$(lib_suffix) \ $(dist)/lib/$(lib_prefix)gkbase_s.$(lib_suffix) \ $(dist)/lib/$(lib_prefix)gkconshared_s.$(lib_suffix) \ $(dist)/lib/$(lib_prefix)gk
xultree_s.$(lib_suffix) \ $(dist)/lib/$(lib_prefix)gk
xulgrid_s.$(lib_suffix) \ $(null) include $(topsrcdir)/config/rules.mk shared_library_libs is set to a l...
... building jar files jar files are used for packaging chrome files (
xul, javascript, and css).
Limitations of frame scripts
examples of apis add-on authors should avoid in frame scripts: nsifileinputstream nsifileoutputstream constructing a file from a string or nsifile (but file objects can be sent via message manager) htmlinputelement.mozsetfilenamearray (alternative: mozsetfilearray)
xul and browser ui anything that tries to touch the browser ui or anything to do with
xul is likely to not work in the content process.
... for example: nsipromptservice nsifilepicker nsi
xul* <need more examples> services some services will not work in frame scripts.
...the target property of the object passed into the message handler in the chrome process is the
xul <browser> receiving the message, and you can get the chrome window from that (note: i'm not really sure how...).
Limitations of frame scripts
for example: nsifileinputstream nsifileoutputstream constructing a file from a string or nsifile (but file objects can be sent via message manager) htmlinputelement.mozsetfilenamearray (alternative: mozsetfilearray) file: uris, see bug 1187099 <...>
xul and browser ui anything that tries to touch the browser ui or anything to do with
xul is likely not to work in the content process.
... for example: nsipromptservice nsifilepicker nsi
xul* <need more examples> services some services will not work in frame scripts.
...the target property of the object passed into the message handler in the chrome process is the
xul <browser> receiving the message, and you can get the chrome window from that (i'm not sure how).
Message manager overview
note that in this context, "browser" refers to the
xul <browser> object, which is a frame that hosts a single web document.
... it's a chromemessagebroadcaster object, which implements the following interfaces: nsiframescriptloader nsimessagelistenermanager nsimessagebroadcaster the window message manager can be accessed as a property of the browser window: // chrome script let windowmm = window.messagemanager; browser message manager the browser message manager is specific to a single
xul <browser> element (which essentially corresponds to a single tab): loadframescript() loads the given script only into its <browser> sendasyncmessage() sends the message only to that <browser>.
... it's a chromemessagesender object, which implements the following interfaces: nsiprocesschecker nsiframescriptloader nsimessagelistenermanager nsimessagesender the browser message manager can be accessed as a property of the
xul <browser> element: // chrome script let browsermm = gbrowser.selectedbrowser.messagemanager; process message managers process message managers correspond to process boundaries, and enable code running in different processes to communicate.
Gecko Keypress Event
xul application developers should use key elements for handling accel keys, so as to make use of the handling logic already provided for these elements.
...
xul applications should not attempt to implement shortcuts by interpreting keypress events.
... in the unfortunately situation where
xul applications attempt to implement their own shortcut key handling, the decentralized implementation may need to be rewritten every time any of the above process is changed.
Gecko
gecko's function is to render web content, such as html, css,
xul, javascript, and render it on the user's screen or print it.
... in
xul-based applications gecko also renders the application's user interface.
... view all… community view mozilla forums: mailing list newsgroup rss feed related topics web standards
xul embedding mozilla developing mozilla ...
Profile Manager
firefox and other
xulrunner applications store user settings and data in special folders, called profiles.
... firefox provides a built-in applet to manage these profiles, but it will eventually be going away (see bug 214675), so a new standalone profile manager application has been created, which works with any
xulrunner application, and has many features not found in firefox's built-in version.
... by default, profile manager will manage firefox profiles, but you can also use it to work with profiles of other
xulrunner apps, like thunderbird or seamonkey.
Profiling SpiderMonkey
instructions 1.) get yourself an optimized lib
xul build of firefox, with debugger info.
...here's a sample mozconfig: mk_add_options moz_objdir=@topsrcdir@/ff-opt-lib
xul mk_add_options moz_make_flags=-j3 ac_add_options --enable-optimize ac_add_options --enable-lib
xul ac_add_options --enable-shark ac_add_options --enable-debugger-info-modules ac_add_options --enable-application=browser 2.) you'll want to run shark on both the browser and [xpcshell], since the host environments differ.
... here are some instrumented tests to work from: media:profiling-ammo.zip 3.) once you have some changes you'd like to try, you can just rebuild the js/src directory, since it produces its own shared library, even in lib
xul and static builds.
Gecko object attributes
common attributes class the class name for an element from html,
xul, svg, etc.
... applied to: any role which related dom node has id attribute tag the actual markup tag used to create this element (also used in
xul).
... applied to: role_cell for the <
xul:tree/> note: it's not exposed currently table related attributes layout-guess true when gecko's heuristic determines that it is a table that is probably used for layout, not for table.
XForms Accessibility
you can try the following link to test xforms accessibility: visual xforms elements in xhtml document at bugzilla.mozilla.org visual xforms elements in
xul document at bugzilla.mozilla.org you can see xforms sample tests at mozilla xforms project there are set of tests at beaufour.dk w3c's xforms test at w3.org keyboard navigation issues navigation sequence though xforms spec declares navindex attribute to define the navigation sequence (see 1.0 specs or 1.1 specs) but rich schwerdtfeger (distinguished engineer, swg accessibility architect/st...
... therefore since mozilla xforms works in xhtml (1.x) or
xul documents only then we use tabindex instead.
... note, we support -moz-user-focus style neither for xhtml or
xul.
Toolkit API
the mozilla toolkit is a set of programming interfaces (apis) built on top of gecko which provide advanced services to
xul applications.
... these services include: profile management chrome registration browsing history extension and theme management application update service safe mode printing official references structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and
xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis
xul application packaging: specific information about how to package
xulrunner applications chrome registration printing in
xul apps see also the following developer pages contain examples and discussi...
...ons of particular topics:
xul xul overlays developing extensions
xulrunner developing themes dom rdf storage ...
Fun With XBL and XPConnect
introduction this article describes an application of xbl in which a simple xpcom interface is made accessible to a
xul widget.
...once the regular
xul textfield widget is bound to this interface, it calls the auto complete function of the object using regular javascript.
... <binding name="autocomplete" extends="
xul:box"> <content> <
xul:textfield class="addressingwidget"/> <
xul:menupopup/> </content> <implementation> <property name="autocompletesession"> <![cdata[ components.classes['component://netscape/messenger/autocomplete&type=addrbook'].
Starting WebLock
the weblock user interface the weblock component in this tutorial uses
xul to define the additional browser ui in a cross-platform way, and
xul uses javascript to access and control xpcom components, but gecko's pluggable ui allows any user interface to call into gecko and the components you create as easily as you can from
xul.
... see
xul for a discussion of how
xul interacts with javascript and xpcom.
...in mozilla, javascript is the bridge between components and the
xul-based user interface.
Using XPCOM Components
the cookie manager dialog this dialog is written in
xul and javascript, and uses a part of xpcom called xpconnect to seamlessly connect to the cookiemanager component (see connecting to components from the interface below).
...
xul is just one way to expose the functionality of the cookiemanager component-but it's a particularly useful one in the mozilla world.
... xpconnect is what binds the application code to the user interface of the mozilla browser, to other gecko-based
xul, and to javascript environments like xpcshell, which is a command-line javascript interpreter and xpcom tool is built with mozilla.
JavaXPCOM
note: javaxpcom was included in
xulrunner up through version 1.9.2.
... it has been removed in
xulrunner 2, and is not actively maintained.
... embedding mozilla in a java application using javaxpcom
xulrunner ships with the javaxpcom component, which allows java code to interact with xpcom objects.
Observer Notifications
xul-window-destroyed called just before a
xul window is destroyed.
...
xul-window-registered nsiappwindow called just after a top level
xul window is registered with the window mediator service.
...
xul-window-visible nsiappwindow called just after a
xul window is made visible.
nsIMsgAccountManagerExtension
a panel consists of a
xul file with a page element as root element and the property file containing the localized name.
...an account manager extension with a "name" attribute of "devmo" and the "chromepackagename" attribute set to "extension@example.org" means, that the account manager expects to find a
xul file in "chrome://extension@example.org/content/am-devmo.
xul" and a property file in "chrome://extension@example.org/locale/am-devmo.properties" containing a property named "prefpanel-devmo".
...it has to be unique and defines the file name of the property file and the
xul page as well as the name of the localized string contained in the property file.
nsIStringBundle
inherits from: nsisupports last changed in gecko 1.7 this interface is used by
xul:stringbundle to retrieve strings.
... it is recommended that you use the methods of
xul:stringbundle to access these functions unless necessary.
... see also
xul:stringbundle
xul tutorial:property files nsistringbundleservice ...
nsITreeBoxObject
further information about trees is given in the
xul tutorial.
... /layout/
xul/base/src/tree/public/nsitreeboxobject.idlscriptable please add a summary to this article.
... void clearstyleandimagecaches(); other references tree widget changes (applies to gecko 1.8.0 and later)
xul tutorial:tree box sorting and filtering a custom tree view
xul tutorial:tree view details nsitreeview ...
XPCOM ABI
to put it simply, an xpcom component built for a specific abi would only be compatible with firefox, thunderbird or other
xulrunner application built for the same abi.
...r abi and may be either: msvc - microsoft visual c++ n32 - irix 6 c++ compiler gcc2 - gnu c++ compiler 2.x gcc3 - gnu c++ compiler 3.x or 4.x sunc - sun c++ compiler ibmc - ibm c++ compiler for example: firefox built with the gnu c++ compiler 4.0.0 for the intel pentium processor would have xpcom abi of x86-gcc3 the xpcom abi string can be retrieved programmatically by using the nsi
xulruntime interface.
... to retrieve the abi of your firefox or thunderbird, open the error console (accessible through tools | error console) and evaluate the following javascript code: components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsi
xulruntime) .xpcomabi if either the cpu architecture or the c++ compiler are unknown, the application wouldn't have an xpcom abi string and attempts to get it will result in error ns_error_not_available.
Address Book examples
new contact dialog window.opendialog("chrome://messenger/content/addressbook/abnewcarddialog.
xul", "", "chrome,resizable=no,titlebar,modal,centerscreen", {selectedab:selectedab}); edit contact dialog window.opendialog("chrome://messenger/content/addressbook/abeditcarddialog.
xul", "", "chrome,resizable=no,modal,titlebar,centerscreen", {aburi:aburi, card:card}); new list dialog win...
...dow.opendialog("chrome://messenger/content/addressbook/abmaillistdialog.
xul", "", "chrome,resizable=no,titlebar,modal,centerscreen", {selectedab:selectedab}); edit list dialog window.opendialog("chrome://messenger/content/addressbook/abeditlistdialog.
xul", "", "chrome,resizable=no,titlebar,modal,centerscreen", {abcard:abcard, listuri:listuri}); new address book dialog unlike the edit address book dialog, the new address book dialog does not currently have the facility to get the chrome uri based on the address book type.
... for local (mork) address books: window.opendialog( "chrome://messenger/content/addressbook/abaddressbooknamedialog.
xul", "", "chrome,modal=yes,resizable=no,centerscreen", null); for ldap address books: window.opendialog("chrome://messenger/content/addressbook/pref-directory-add.
xul", "", "chrome,modal=yes,resizable=no,centerscreen", null); note: there is no new address book dialog for the os x address book.
Creating a Custom Column
for this we overlay messenger.
xul, by placing the following line in our chrome.manifest file: overlay chrome://messenger/content/messenger.
xul chrome://replyto_col/content/replyto_col_overlay.
xul now that our overlay is set up we need to connect a column to the current columns that exist.
... looking in messenger.
xul reveals that the columns reside inside a tree with the id "threadtree" whose columns (treecols) reside in "threadcols".
... our replyto_col_overlay.
xul should now contain something similar to this: <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <tree id="threadtree"> <treecols id="threadcols"> <splitter class="tree-splitter" /> <treecol id="colreplyto" persist="hidden ordinal width" currentview="unthreaded" flex="2" label="reply-to" tooltiptext="click to sort by the reply-to header" /> </treecols> </tree> <!-- include our javascript file --> <script type="text/java...
Add Option to Context Menu
assuming this on chrome.manifest: overlay chrome://messenger/content/mailwindowoverlay.
xul chrome://myext/content/thunderbird-overlay.
xul add the next in thunderbird-overlay.
xul.
... for thunderbird 2 <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <menupopup id="messagepanecontext"> <menuitem id="my_option" label="my option concise and cool label" oncommand="alert('hi')"/> </menupopup> </overlay> for thunderbird 3 <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <popup id="mailcontext"> <menuitem id="my_option" label="my option concise and cool label" oncommand="alert('hi')"/> </popup> </overlay> for thunderbird 2 and 3 in the same xpi if our extension needs to support thunderbird 2 and 3 we need to mak...
...this can be reached by adding these lines to the chrome.manifest file: overlay chrome://messenger/content/mailwindowoverlay.
xul chrome://myaddon/content/tboverlay-tb2.
xul appversion<3.0 overlay chrome://messenger/content/mailwindowoverlay.
xul chrome://myaddon/content/tboverlay-tb3.
xul appversion=>3.0 than we need two overlay
xul files with content from examples above.
Toolkit version format
this document is a reference for the version format, as used in firefox 1.5 (
xulrunner 1.8) and later.
... the following preferences: app.extensions.version, extensions.lastappversion versions returned by nsi
xulappinfo.
... application.ini in
xulrunner applications appversion flag in chrome manifests.
DOM Inspector FAQ - Firefox Developer Tools
inspect chrome document inspect application chrome, including open
xul windows, e.g., the browser window.
...these can include chrome documents, but it's not suggested that you inspect
xul documents by directly inspecting them via url, since some behavior may rely on the document being contained in another
xul document, or the converse, where it won't behave correctly because it doesn't expect to be loaded as a framed document.
... instead, get the
xul document to load as you normally would (e.g., by invoking commands or opening windows via standard application use), then locate it in the inspect chrome document menu.
Introduction to DOM Inspector - Firefox Developer Tools
dom inspector is standalone; it supports all toolkit applications, and it's possible to embed it in your own
xulrunner app.
...(note that there are bugs which prevent the flasher from dom inspector apis from working correctly on certain platforms.) if you inspect the main browser window, for example, and select nodes in the dom nodes viewer (other than the elements which have no visible ui as is the case with the endless list of script elements that are loaded into browser.
xul), you will see the various parts of the browser interface being highlighted with a blinking red border.
... the box model viewer gives various metrics about
xul and html elements, including placement and size.
Browser Console - Firefox Developer Tools
this means you can interact with all the browser's tabs using the gbrowser global, and even with the
xul used to specify the browser's user interface.
...you can confirm this by evaluating window: this means you can control the browser: opening, closing tabs and windows and changing the content that they host, and modify the browser's ui by creating, changing and removing
xul elements.
...on windows, the following code will add a new item to the browser's main menu: var parent = window.document.getelementbyid("appmenuprimarypane"); var makethetea = gbrowser.ownerdocument.defaultview.document.createelementns("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul", "menuitem"); makethetea.setattribute("label", "a nice cup of tea?"); parent.appendchild(makethetea); on macos, this similar code will add a new item to the "tools" menu: var parent = window.document.getelementbyid("menu_toolspopup"); var makethetea = gbrowser.ownerdocument.defaultview.document.createelementns("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul", "menuitem"); maketh...
Document.createElementNS() - Web APIs
important namespace uris html http://www.w3.org/1999/xhtml svg http://www.w3.org/2000/svg mathml http://www.w3.org/1998/math/mathml
xul http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul xbl http://www.mozilla.org/xbl example this creates a new <div> element in the xhtml namespace and appends it to the vbox element.
... although this is not an extremely useful
xul document, it does demonstrate the use of elements from two different namespaces within a single document: <?xml version="1.0"?> <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" xmlns:html="http://www.w3.org/1999/xhtml" title="||working with elements||" onload="init()"> <script type="application/javascript"><![cdata[ let container; let newdiv; let txtnode; function init(){ container = document.getelementbyid("containerbox"); newdiv = document.createelementns("http://www.w3.org/1999/xhtml", "div"); txtnode = document.createtextnode("this is text that was constructed dynamically with createelementns and createtextnode then inserted into the document using appendchild."); newdiv.appendchi...
...this particular example is actually an
xul document with embedded xhtml, however, the recommendation still applies.
Document.title - Web APIs
example <!doctype html> <html> <head> <title>hello world!</title> </head> <body> <script> alert(document.title); // displays "hello world!" document.title = "goodbye world!"; alert(document.title); // displays "goodbye world!" </script> </body> </html> notes this property applies to html, svg,
xul, and other documents in gecko.
...for
xul it's the value of the title attribute of the <
xul:window> or other top-level
xul element.
... in
xul, accessing document.title before the document is fully loaded has undefined behavior: document.title may return an empty string and setting document.title may have no effect.
Document.tooltipNode - Web APIs
the document.tooltipnode property returns the node which is the target of the current <
xul:tooltip>.
... syntax document.tooltipnode; specification
xul-specific method.
...defined in nsidom
xuldocument.idl.
Document - Web APIs
non-standard extensions firefox notes mozilla defines a set of non-standard properties made only for
xul content: document.currentscript returns the <script> element that is currently executing.
... document.loadoverlay()obsolete since gecko 61 loads a
xul overlay dynamically.
... this only works in
xul documents.
Window.controllers - Web APIs
the controllers property of the window interface returns the
xul controllers of the chrome window.
... syntax controllers = window.controllers controllers is an object of type
xulcontrollers (nsicontrollers).
... specification
xul-specific.
Window.openDialog() - Web APIs
example var win = opendialog("http://example.tld/zzz.
xul", "dlg", "", "pizza", 6.98); notes new features all - initially activates (or deactivates ("all=no")) all chrome (except the behavior flags chrome, dialog and modal).
... passing extra parameters to the dialog to pass extra parameters into the dialog, you can simply supply them after the windowfeatures parameter: opendialog("http://example.tld/zzz.
xul", "dlg", "", "pizza", 6.98); the extra parameters will then get packed into a property named arguments of type array, and this property gets added to the newly opened dialog window.
... var retvals = { address: null, delivery: null }; opendialog("http://example.tld/zzz.
xul", "dlg", "modal", "pizza", 6.98, retvals); if you set the properties of the retvals object in the dialog code as described below, you can now access them via the retvals array after the opendialog() call returns.
-moz-image-region - CSS: Cascading Style Sheets
for certain
xul elements and pseudo-elements that use an image from the list-style-image property, this property specifies a region of the image that is used in place of the whole image.
... formal definition initial valueautoapplies to
xul <image> elements and :-moz-tree-image, :-moz-tree-twisty, and :-moz-tree-checkbox pseudo-elements.
...it will not work with
xul <image src="url" />.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax <shape> | autowhere <shape> = rect(<top>, <right>, <bottom>, <left>) examples clipping an image #example-button { /* display only the 4x4 area from the top left of this image */ list-style-image: url("chrome://example/skin/example.png"); -moz-image-region: rect(0px, 4px, 4px, 0px); } #example-button:hover { /* use the 4x4 area to the right of the first for the hovered button */ -moz-image-region: rect(0px, 8px, 4px, 4px); } specifications not part of any standard.
cfx - Archive of obsolete content
you can specify "firefox", "
xulrunner", "fennec", or "thunderbird".
...you can specify "firefox", "
xulrunner", "fennec", or "thunderbird".
Developing for Firefox Mobile - Archive of obsolete content
firefox for android implements its ui using native android widgets instead of
xul.
... places/favicon not supported places/history not supported platform/xpcom supported preferences/service supported stylesheet/style supported stylesheet/utils supported system/environment supported system/events supported system/runtime supported system/unload supported system/
xul-app supported tabs/utils supported test/assert supported test/harness supported test/httpd supported test/runner supported test/utils supported ui/button/action not supported ui/button/toggle not supported ui/frame not supported ui/id supported ui/sidebar not supp...
Add-on SDK - Archive of obsolete content
xul migration a guide to porting
xul add-ons to the sdk.
... this guide includes a comparison of the two toolsets and a working example of porting a
xul add-on.
Label and description - Archive of obsolete content
the default style for these
xul elements includes white-space: wrap;.
... note: if running in a
xulrunner application add the following preferences to your default preferences file: pref("network.protocol-handler.expose.http", false); pref("network.protocol-handler.warn-external.http", false); change or add additional protocols (https or ftp) as needed.
Preferences - Archive of obsolete content
when a change is made to the preferences, you can take the appropriate action (such as reinitializing variables or toggling display properties in
xul components).
...api a brief guide to mozilla preferences — describes preferences system from user's/administrator's pov mozilla xpcom interfaces of the preferences system most used interfaces (these are frozen and will not change): nsiprefbranch and nsiprefservice nsiprefbranch2 interface (before gecko 1.8 it was called nsiprefbranchinternal) preferences system - an easy way to create a
xul options window for your extension or application syncing preferences across clients using sync lxr pages for libpref, the source code module that implements the preferences system a javascript wrapper for preferences api adding preferences to an extension — a simple tutorial with a working extension that illustrates the use of preference observers inline options - how to use the new prefer...
Windows - Archive of obsolete content
nt.clienty]; } function mousemove(event) { if (startpos) { var newx = event.screenx - startpos[0]; var newy = event.screeny - startpos[1]; window.moveto(newx, newy); } } function mouseup(event) { startpos = null; } window.addeventlistener("mousedown", mousedown, false); window.addeventlistener("mouseup", mouseup, false); window.addeventlistener("mousemove", mousemove, false);
xul titlebar element
xul applications can take advantage of the titlebar element to achieve a similar result without extra javascript code.
...s.classes["@mozilla.org/embedcomp/window-watcher;1"] .getservice(components.interfaces.nsiwindowwatcher) .getwindowenumerator(); var index = 1; var windowname = "yourwindowname"; while (wenum.hasmoreelements()) { var win = wenum.getnext(); if (win.name == windowname) { win.focus(); return; } index++ } window.open("chrome://to/your/window.
xul", windowname, "features"); uniquely identifying dom windows requires gecko 2.0(firefox 4 / thunderbird 3.3 / seamonkey 2.1) in gecko, each dom window has a unique 64-bit id number.
Code snippets - Archive of obsolete content
many of these samples can also be used in
xulrunner applications, as well as in actual mozilla code itself.
...to/from the integrated password manager bookmarks code used to read and write bookmarks javascript debugger service code used to interact with the javascript debugger service svg general general information and utilities svg animation animate svg using javascript and smil svg interacting with script using javascript and dom events to create interactive svg embedding svg in html and
xul using svg to enhance html or
xul based markup
xul widgets html in
xul for rich tooltips dynamically embed html into a
xul element to attain markup in a tooltip label and description special uses and line breaking examples tree setup and manipulation of trees using
xul and js scrollbar changing style of scrollbars.
Enhanced Extension Installation - Archive of obsolete content
[hklm|hkcu]\software\mozilla\firefox\extensions given these goals, and the likelihood of future goals, such as potential for extensions to the
xulrunner framework, common drop zones for xpis etc it makes sense to have the set of install locations be customizable.
... the term "firefox" is used in this document to imply any application built on
xulrunner that uses the extension system.
Hiding browser chrome - Archive of obsolete content
this can be accomplished by augmenting the behavior of the
xulbrowserwindow object's hidechromeforlocation() method.
...var prevfunc =
xulbrowserwindow.hidechromeforlocation;
xulbrowserwindow.hidechromeforlocation = function(alocation) { return (/* your test goes here */) || prevfunc.apply(
xulbrowserwindow, [alocation]); } this works by saving a reference to the current implementation of the hidechromeforlocation() method, then replacing it with a new method that calls through to the previous implementation.
Listening to events in Firefox extensions - Archive of obsolete content
types of events there are multiple types of events that application and extension authors can use to receive notifications from <
xul:browser> and <
xul:tabbrowser> elements to hear about changes relating to loads of the content contained within them.
...
xulbrowserwindow
xulbrowserwindow is an nsiwebprogresslistener used to get progress events for the currently visible browser.
Firefox addons developer guide - Archive of obsolete content
the firefox add-ons developer guide was contributed by the mozilla japan community; it covers how to go about building firefox extensions using xpcom and
xul.
... next » introduction to extensions technologies used in developing extensions introduction to
xul—how to build a more intuitive ui using xpcom—implementing advanced processes let's build a firefox extension firefox extensions and
xul applications license and authors next » ...
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
window.addeventlistener( "load", function() {
xulschoolchrome.browseroverlay.init(); }, false); then all we need is some persistent flag that ensures that the first run code is only run once.
...so, if we were to use fuel, we can do the following in the init function: init : function() { let firstrunpref = "extensions.
xulschoolhello.firstrundone"; if (!application.prefs.getvalue(firstrunpref, false)) { application.prefs.setvalue(firstrunpref, true); // all the rest of the first run code goes here.
Using the Stylesheet Service - Archive of obsolete content
remember to declare the correct namespace if you want to apply stylesheets to
xul documents.
...in firefox 3, the changes take effect immediately, though some declarations (especially those affecting
xul) won't work until a reload.
Creating reusable content with CSS and XBL - Archive of obsolete content
copy and paste the content from here: <?xml version="1.0"?> <!doctype bindings> <bindings xmlns="http://www.mozilla.org/xbl" xmlns:
xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" xmlns:html="http://www.w3.org/1999/xhtml"> <binding id="square"> <resources> <stylesheet src="bind6.css"/> </resources> <content> <html:div anonid="square"/> <
xul:button anonid="button" type="button"> <children/> </
xul:button> </content> <implementation> <field name="square"><!
...the next page demonstrates it:
xul user interfaces.
cert_override.txt - Archive of obsolete content
this file is used by firefox, thunderbird, and other
xul-based applications.
... since there is no way to add easily an exception in a
xulrunner 1.9 project, you can open the page in firefox, accept the certificate, then copy the cert_override.txt to the
xulrunner application profile.
Enabling the behavior - updating the status periodically - Archive of obsolete content
to enable its functionality, we have to add a reference to our javascript code into navigator.
xul, just as we put a reference to our css code into that file back in specifying the appearance.
... put the javascript code into a file called tinderstatus.js in the same directory as navigator.
xul and reference it in navigator.
xul where other javascript scripts are referenced: ...
Making a Mozilla installation modifiable - Archive of obsolete content
mozilla's user interface is made up of
xul (described below), xbl (a topic for another tutorial), javascript, css, and image files.
...
xul, xbl, javascript, and css files are all in text format and can be edited in a standard text editor, while image files are in binary gif, jpg, or png format and must be edited with an image editing program.
Drag and Drop - Archive of obsolete content
mozilla and
xul provide a number of events that can handle when the user attempts to drag objects around.
... ondragstart an alias for ondraggesture; this is the html 5 spec name for the event and may be used in html or
xul; however, for backward compatibility with older versions of firefox, you may wish to continue using ondraggesture in
xul.
Creating a Help Content Pack - Archive of obsolete content
documentation contained in the help viewer can be accessed using any
xul application or program that embeds mozilla.
... viewing your content pack in the help viewer to launch the help viewer with your content pack, you need to have chrome://help/content/contexthelp.js loaded into the
xul file that provides the ui to open the help viewer: <script type="application/javascript" src="chrome://help/content/contexthelp.js"/> this will allow you to access all of the viewer functions.
Venkman Introduction - Archive of obsolete content
icon file type .js .html, .htm .
xul .xml all other files javascript function figure 6.
... to debug your extension with venkman (
xul files and their attached js files), you'll have to load browser and extension files into venkman by unchecking debug > exclude browser files.
Example Sticky Notes - Archive of obsolete content
iv> <div class="sticker"><p>learn more about xbl.</p></div> <p style="clear: left"><a href="http://validator.w3.org/check?uri=referer"><img src="https://udn.realityripple.com/samples/e2/dd625ef1cd.png" width="88" height="31" alt="valid html 4.01" style="border: 1px none"></a></p> </body> </html> notes.xml <?xml version="1.0"?> <bindings xmlns="http://www.mozilla.org/xbl" xmlns:
xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- in above only xbl namespace declaration is mandatory.
... the others are only needed if you plan to handle
xul (xml user interface language) or/and svg (scalable vector graphics) in your bindings; xlink in xml also may come useful sometimes.
XPInstall - Archive of obsolete content
<?xml version="1.0" encoding="utf-8"?> <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <!-- properties --> </description> </rdf> cross-platform install (xpinstall) is a technology used by mozilla application suite, mozilla firefox, mozilla thunderbird and other
xul-based applications for installing extensions.
... mailing list newsgroup rss feed tools xpinstall trigger page related topics extensions,
xul, xpi ...
accesskey - Archive of obsolete content
«
xul reference home attribute of: button, checkbox, caption, description, label, listitem, menu, menuitem, menulist, tab, radio, toolbarbutton, textbox accesskey type: character this should be set to a character that is used as a shortcut key.
... example <vbox> <label value="enter name" accesskey="e" control="myname"/> <textbox id="myname"/> <button label="cancel" accesskey="n"/> <button label="ok" accesskey="o"/> </vbox> see also label attribute acceltext attribute
xul accesskey faq and policies ...
checkState - Archive of obsolete content
«
xul reference home checkstate type: integer, values 0, 1, or 2 this attribute may be used to create three state buttons, numbered 0, 1 and 2.
...constants for the possible values for this attribute are in the nsidom
xulbuttonelement interface.
datasources - Archive of obsolete content
«
xul reference home datasources type: space separated list of datasource uris a space-separated list of datasources that an element's template will use for content generation.
... when the
xul document is contained on a remote web site, the datasources may only be loaded from the same domain as the document.
menuitem.name - Archive of obsolete content
«
xul reference home name type: string name radio menuitems with the same name as put into a group.
...-menubar"> <menu id="planet-menu" label="planet"> <menupopup> <menuitem id="jupiter" label="jupiter" type="radio" name="planet"/> <menuitem id="saturn" label="saturn" type="radio" name="planet" checked="true"/> <menuitem id="uranus" label="uranus" type="radio" name="planet"/> </menupopup> </menu> </menubar> </toolbox> see also name and menus in the
xul tutorial ...
menuitem.type - Archive of obsolete content
«
xul reference home type type: one of the values below can be used to create checkable menuitems or for radio button menuitems.
... more information on adding checkmarks to menus in the
xul tutorial ...
ordinal - Archive of obsolete content
«
xul reference home ordinal type: string (representing an integer) an integer which specifies the position of the element within its parent.
... by default, elements appear in the order they appear in the
xul code.
pack - Archive of obsolete content
«
xul reference home pack type: one of the values below the pack attribute specifies where child elements of the box are placed when the box is larger that the size of the children.
... see also more on box packing in the
xul tutorial ...
persist - Archive of obsolete content
«
xul reference home persist type: space-separated list of attribute names a space-separated list of attributes that are maintained when the window is closed.
...in mozilla, persistent attributes are stored in the per-profile file
xulstore.json.
popup - Archive of obsolete content
«
xul reference home popup type: id should be set to the value of the id of the popup element that should appear when the user clicks on the element.
... see also more information on the popup element in the
xul tutorial ...
state - Archive of obsolete content
«
xul reference home state type: one of the values below indicates whether the splitter has collapsed content or not.
... more info on splitters in the
xul tutorial ...
statedatasource - Archive of obsolete content
«
xul reference home statedatasource type: uri chrome
xul may specify an rdf datasource to use to store tree state information.
...this information will be remembered for the next time the
xul file is opened.
value - Archive of obsolete content
«
xul reference home value type: string the string attribute allows you to associate a data value with an element.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
wait-cursor - Archive of obsolete content
«
xul reference home wait-cursor type: boolean set this attribute to true to have the cursor switch to a waiting cursor while the mouse is hovering over the element.
... see also https://developer.mozilla.org/docs/talk:
xul/attribute/wait-cursor this seems to work instead of trying to set a wait-cursor attribute: window.setcursor('wait') and window.setcursor('auto') ...
width - Archive of obsolete content
«
xul reference home width type: string (representing an integer) the preferred width of the element.
... <vbox width="30" align="start" style="background-color: red;"> <label value="vbox
xul width 10px red"/> </vbox> note: when used on treecol objects, the width attribute can be used to allow a tree to be scrolled horizontally if the column widths add up to be wider than the containing object.
List of commands - Archive of obsolete content
ious cmd_selectwordnext cmd_scrollpageup cmd_scrollpagedown cmd_scrolllineup cmd_scrolllinedown cmd_movepageup cmd_movepagedown cmd_selectpageup cmd_selectpagedown other commands the following list other commands (prefixed by cmd_ or browser:) which have not been categorized here yet (though they are in the alphabetical list below): http://lxr.mozilla.org/seamonkey/sou...baroverlay.
xul http://lxr.mozilla.org/seamonkey/sou...t/navigator.js http://lxr.mozilla.org/seamonkey/sou...toroverlay.
xul http://lxr.mozilla.org/seamonkey/sou...onaltoolbar.js http://lxr.mozilla.org/seamonkey/sou...rceoverlay.
xul http://lxr.mozilla.org/seamonkey/sou...extoverlay.
xul http://lxr.mozilla.org/seamonkey/sou...lityoverlay.js http://lxr.mozilla.org/seamonkey/sou...oomoverlay.
xul http://lxr.mo...
...zilla.org/seamonkey/sou...toroverlay.
xul http://lxr.mozilla.org/seamonkey/sou...ark.properties http://lxr.mozilla.org/seamonkey/sou...kmarks-temp.js http://lxr.mozilla.org/seamonkey/sou.../bookmarks.xml http://lxr.mozilla.org/seamonkey/sou...rksoverlay.
xul http://lxr.mozilla.org/seamonkey/sou...okmarkstree.js list of commands (listed alphabetically) browser:addbookmark browser:addbookmarkas browser:addgroupmarkas browser:back browser:editpage browser:find browser:findagain browser:findprev browser:forward browser:home browser:managebookmark browser:open browser:openfile browser:print browser:printpreview browser:savepage browser:searchinternet browser:sendpage browser:uploadfile cmd_bm_copy cmd_bm_cut cmd_bm_delete cmd_bm_expandfolder cmd_bm_export cmd_bm_f...
appendNotification - Archive of obsolete content
«
xul reference home appendnotification( label , value , image , priority , buttons, eventcallback ) return type: element create a new notification and display it.
...keep in mind that this is all
xul so using html elements for styling might still need additional css in order to work as you might expect.
getElementsByAttribute - Archive of obsolete content
«
xul reference home getelementsbyattribute( attrib, value ) return type: dom nodelist returns a nodelist of all the child elements of the element that have the attribute given by the first argument set to the value given by the second argument.
... note that this method is only available on
xul elements; it is not part of the w3c dom.
getElementsByAttributeNS - Archive of obsolete content
«
xul reference home getelementsbyattributens(ns, attrib, value ) return type: dom nodelist returns an array of all the child elements of the element that have the attribute namespace given by the first argument, the attribute name given by the second argument, and the value given by the third argument.
... note that this method is only available on
xul elements and is not part of the dom.
boxObject - Archive of obsolete content
«
xul reference boxobject type: nsiboxobject this property is available for elements that are derived from boxes, which is most displayable
xul elements.
... prior to gecko 1.9.1, you can retrieve the boxobject for non-
xul elements using the document.getboxobjectfor method; the method was removed in gecko 1.9.1 because it was non-standard.
controllers - Archive of obsolete content
«
xul reference controllers type: nsicontrollers a controllers list attached to the element.
... example <window id="controller-example" title="controller example" onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <script> function init() { var list = document.getelementbyid("thelist"); var listcontroller = { supportscommand : function(cmd){ return (cmd == "cmd_delete"); }, iscommandenabled : function(cmd){ if (cmd == "cmd_delete") return (list.selecteditem != null); return false; }, docommand : function(cmd){ list.removeitemat(list.selectedindex); }, onevent : function(evt){ } }; list.controllers.appendcontroller(listcont...
Providing Command-Line Options - Archive of obsolete content
extensions and
xul applications can modify the way command line parameters are handled by writing a component that implements the nsicommandlinehandler interface and registering it in a category.
... see also:
xulrunner:commandline overview the code below is an example of writing a javascript xpcom component to handle command line parameters.
Sorting and filtering a custom tree view - Archive of obsolete content
sort.
xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <!doctype window> <window title="sorting a custom tree view example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" onload="init()"> <script type="application/javascript" src="sort.js"/> <hbox align="center" id="search-box"> <label accesskey="f" control="filter">filter</label> ...
... data = []; //the property names match the column ids in the
xul.
Additional Template Attributes - Archive of obsolete content
<listbox datasources="template-guide-photos5.rdf" ref="http://www.
xulplanet.com/rdf/myphotos" template="phototemplate"/> ...
... <hbox datasources="template-guide-photos5.rdf" ref="http://www.
xulplanet.com/rdf/myphotos"> <template container="?start" member="?photo"> <rule> <image uri="?photo" src="?photo"/> </rule> </template> </hbox> in this example, the ?photo variable can be used instead of 'rdf:*' (although you can use either even if you specify the member variable).
Filtering - Archive of obsolete content
function applyfilter(country) { var cond = document.getelementbyid("cond"); var triple = document.getelementbyid("filtertriple"); if (country) { if (!triple) { triple = document.createelement("triple"); triple.id = "filtertriple"; triple.setattribute("subject", "?photo"); triple.setattribute("predicate", "http://www.
xulplanet.com/rdf/country"); } triple.setattribute("object", country); cond.appendchild(triple); } else if (triple) { cond.removechild(triple); } document.getelementbyid("photoslist").builder.rebuild(); } the 'country' argument to the applyfilter function holds the value to filter by.
...for example, the resulting triple for the netherlands might be: <triple subject="?photo" predicate="http://www.
xulplanet.com/rdf/country" object="http://www.daml.org/2001/09/countries/iso#nl"/> this triple is then appended to the query.
Static Content - Archive of obsolete content
what's going on here is that the
xul parser first creates the outer menulist element.
...the result will be a
xul display that looks just like the code above, except that the template and its content is hidden.
XML Templates - Archive of obsolete content
using inline xml it's also possible to embed the xml data directly within the
xul document if desired.
...note the only change is that the addition of the xmlns attribute on the data; this is used to clear the namespace used for the elements in the data, otherwise they become
xul elements.
Code Samples - Archive of obsolete content
here are the names and uris of some windows: thunderbird configuration const name = "preferences:configmanager" const uri = "chrome://global/content/config.
xul" passwords const name = "toolkit:passwordmanager" const uri = chrome://messenger/content/preferenc...wpasswords.
xul" mail & newsgroups const name = "mail:3pane" const uri = "chrome://messenger/content/" sunbird passwords* const name = "toolkit:passwordmanager" const uri = "chrome://passwor...
...dmgr/content/passwordmanager.
xul" seamonkey navigator const name = "navigator:browser" const uri = "chrome://navigator/content/" mail & newsgroups const name = "mail:3pane" const uri = "chrome://messenger/content/" composer const name = "composer:html" const uri = "chrome://editor/content/" address book const name = "mail:addressbook" const uri = "chrome://messenger/content/addressbo...ddressbook.
xul" irc chat const name = "irc:chatzilla" const uri = "chrome://chatzilla/content/" calendar const name = "calendarmainwindow" const uri = "chrome://calendar/content/" * at the time of wr...
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
valid event types are those supported by
xul and javascript, such as click and focus.
...e following alternate syntax can be used when the code in a handler is more complex: <binding id="binding-name"> <handlers> <handler event="event-name"> -- handler code goes here -- </handler> </handlers> </binding> handlers example the following example adds some key handlers to create a very primitive local clipboard: example 1 : source <binding id="clipbox"> <content> <
xul:textbox/> </content> <implementation> <field name="clipboard"/> </implementation> <handlers> <handler event="keypress" key="x" modifiers="control" action="this.clipboard=document.getanonymousnodes(this)[0].value; document.getanonymousnodes(this)[0].value='';"/> <handler event="keypress" key="c" modifiers="control" action="this.clipboard=document.getanonymousnodes(t...
Adding Properties to XBL-defined Elements - Archive of obsolete content
xul: <box id="random-box" class="randomizer"/> <button label="generate" oncommand="document.getelementbyid('random-box').number=math.random();"/> <button label="show" oncommand="alert(document.getelementbyid('random-box').number)"/> xbl: <binding id="randomizer"> <implementation> <field name="number"/> </implementation> </binding> a number field has been defined in ...
...in this example, no content has been placed inside either the
xul box or its definition in xbl, which is perfectly valid.
Box Model Details - Archive of obsolete content
you can put boxes anywhere in a
xul file, including inside an html element such as a table.
...a find text dialog example 5 : source view <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findtext" title="find text" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <vbox flex="3"> <label control="t1" value="search text:"/> <textbox id="t1" style="min-width: 100px;" flex="1"/> </vbox> <vbox style="min-width: 150px;" flex="1" align="start"> <checkbox id="c1" label="ignore case"/> <spacer flex="1" style="max-height: 30px;"/> <button label="find"/> </vbox> </window> here, two vertical boxes are created, one for the textbox ...
Grids - Archive of obsolete content
« previousnext »
xul has a set of elements for creating tabular grids.
...
xul tabular layout
xul has a set of elements for doing layout of elements in a grid-like manner using the grid element.
Groupboxes - Archive of obsolete content
« previousnext » this section describes a way to include elements into groups groupboxes the groupbox element is used to group related
xul elements together, much like the html fieldset element is used to group html elements.
... the groupbox is a type of box, and the elements it contains are aligned according to the
xul box rules.
More Wizards - Archive of obsolete content
more complex wizard navigation normally, a wizard displays each wizardpage in the order that you place them in the
xul file.
... wizard example source <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <wizard id="thewizard" title="secret code wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <script> function checkcode(){ document.getelementbyid('thewizard').canadvance = (document.getelementbyid('secretcode').value == "cabbage"); } </script> <wizardpage onpageshow="checkcode(); return true;"> <label value="enter the secret code:"/> <textbox id="secretcode" onkeyup="checkcode();"/> </wizardpage> <wizardpage> <label value="that is the correct secret co...
Tree View Details - Archive of obsolete content
<window onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <tree id="elementlist" flex="1"> <treecols> <treecol id="element" label="element" primary="true" flex="1"/> </treecols> <treechildren/> </tree> </window> we use a simple tree here with no data in the treechildren.
...they are added near the end of the complete example, shown here: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <tree id="elementlist" flex="1"> <treecols> <treecol id="element" label="element" primary="true" flex="1"/> </treecols> <treechildren/> </tree> <script> <![cdata[ var treeview = { childdata : { solids: ["silver", "gold", "lead"], liquids: ["mercury"], gases: ["helium", "nitrogen"] }, visibledata : [ ["solids", true, false], ["liquids", true, false], [...
XBL Inheritance - Archive of obsolete content
example 1 : source <binding id="textboxwithhttp" extends="chrome://global/content/bindings/textbox.xml#textbox"> <handlers> <handler event="keypress" keycode="vk_f4"> this.value="http://www"+value; </handler> </handlers> </binding> the xbl here extends from the
xul textbox element.
...(you can also use the value addrbook to look up addresses in the address book.) firefox uses a different autocomplete mechanism than the mozilla suite, see
xul:textbox (firefox autocomplete) in the next section, we'll see an example xbl-defined widget.
XPCOM Interfaces - Archive of obsolete content
calling native objects by using
xul we can build a complex user interface.
...after learning this section, you can search suitable interfaces using
xulplanet xpcom reference about xpcom mozilla is constructed from a collection of components, each of which performs a certain task.
Urlbar-icons - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] the location of ui elements like the bookmarks, feed and go buttons.
... (the url bar is also known as the address bar and the navigation bar.) example the default contents of browser.
xul: <hbox id="urlbar-icons"> <button be="" chromedir="ltr" class="urlbar-icon" click="" for="" id="safebrowsing-urlbar-icon" img="" level="safe" might="" onclick="godocommand('safebrowsing-show-warning');" page="" style="-moz-user-focus:" tooltiptext="this" type="menu"> <img class="urlbar-icon" id="star-button" onclick="placesstarbutton.onclick(event);" /> <img address="" chromedir="ltr" class="urlbar-icon" id="go-button" in="" location="" onclick="handleurlbarcommand(event);" p="" the="" to="" tooltiptext="go" /> </button> </hbox> ...
Window icons - Archive of obsolete content
starting with firefox 1.5, thunderbird 1.5, and
xulrunner 1.8, you can specify an icon for a
xul window by putting files named mywindow.ico (for windows) and mywindow.xpm or mywindow16.xpm (linux), where mywindow is the id of the <window> you want to attach the icon to, in the chrome/icons/default subfolder of your bundle.
... starting with firefox 3.0,
xulrunner 3.0, thunderbird 3.0 and seamonkey 2.0 you can now specify png format icons instead of xpm format on linux.
action - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] used to specify the content that should be generated for each matching result from a query.
... examples example needed attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
bbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a horizontal box that is baseline aligned.
... examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , col...
binding - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] should be contained within a bindings element.
... properties object, predicate, subject examples fixme: (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sort...
bindings - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] used to specify a set of variable bindings for a rule.
... examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresou...
browser - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a
xul <browser> element represents a frame which is expected to contain a view of a web document.
... note: this is the
xul method on <browser> / <tabbrowser>, not the global function in chrome://browser/content/browser.js.
caption - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a header for a groupbox.
...more information is available in the
xul tutorial.
commandset - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element is not displayed and serves as a container for command elements.
... more information is available in the
xul tutorial.
dialogheader - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a heading row for a dialog box.
... attributes crop, description, title examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <dialogheader title="my dialog" description="example dialog"/> <!-- other widgets --> </dialog> attributes crop type: one of the values below if the label of the element is too big to fit in its given space, the text will be cropped on the side specified by the crop attribute.
dropmarker - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a dropmarker is a button with an arrow which will reveal more details when pressed.
... examples properties accessibletype attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltip...
key - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] the key element defines a window-global keyboard shortcut and must be placed inside a keyset element.
... more information is available in the
xul tutorial.
listcol - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a column in a listbox.
...mn flexible --> <listbox> <listhead> <listheader label="first"/> <listheader label="last"/> </listhead> <listcols> <listcol flex="1"/> <listcol/> </listcols> <listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
listcols - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container for the columns of a listbox, each of which are created with the listcol element.
... example <!-- creates a two column listbox --> <listbox> <listcols> <listcol flex="1"/> <listcol flex="1"/> </listcols> <listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
listhead - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a header row of a listbox.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
listheader - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a header for a single column in a listbox.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
menubar - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container that usually contains menu elements.
... more information is available in the
xul tutorial.
notification - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] the notification is used to display an informative message.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as
xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-
xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
page - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] similar to a window, except it should be used for
xul files that are to be loaded into an iframe.
... examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hid...
query - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] used to specify the query for a template.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
queryset - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container for query elements when more than one query is used.
... attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , ...
scrollbar - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] when a container's contents which are larger that the size of the container, scroll bars may be placed at the side of the container to allow the user to scroll around in the container.
... more information is available in the
xul tutorial.
scrollcorner - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element is used for the small box where the horizontal and vertical scrollbars meet.
... examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hid...
separator - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] creates a small separating gap between elements.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
spinbuttons - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] spin buttons are two arrows, one to increase a value and one to decrease a value.
... attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext...
splitter - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an element which should appear before or after an element inside a container.
... more information is available in the
xul tutorial.
statusbar - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] an element used to create a status bar, usually placed along the bottom of a window.
... properties accessibletype examples <statusbar> <statusbarpanel label="left panel"/> <spacer flex="1"/> <progressmeter mode="determined" value="82"/> <statusbarpanel label="right panel"/> </statusbar> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sor...
<statusbarpanel> - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] firefox 4 note the status bar has been removed.
... «
xul reference home statusbarpanel-iconic use this class to have an image appear on the statusbarpanel.
stringbundleset - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container for stringbundle elements.
... examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hid...
tabbox - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container used to display a set of tabbed pages of elements.
... more information is available in the
xul tutorial.
textnode - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] normally when substituting rdf resources in template rules, you place the rdf property name inside an attribute value preceded with rdf:.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
timepicker - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] the timepicker is used to allow the user to enter a time.
...sertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsidom
xulcontrolelement ...
toolbar - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a container which typically contains a row of buttons.
... more information is available in the
xul tutorial.
toolbaritem - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] firefox only an item that appears on a toolbar.
... <menuitem label="bus" selected="true"/> <menuitem label="train"/> </menupopup> </menulist> </toolbaritem> <toolbaritem id="sample-toolbutton-unified"> <toolbarbutton id="myext-button1" class="toolbarbutton-1" label="label1" /> <toolbarbutton id="myext-button2" class="toolbarbutton-1" label="labe2l" /> </toolbaritem> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
toolbarpalette - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] firefox only the item is a palette of available toolbar items.
... examples <toolbarpalette id="browsertoolbarpalette"> <toolbarbutton id="toolbarpalette-button" class="toolbarbutton-class" label="&mylabel;" tooltiptext="&mytiptext;" oncommand="somefunction()"/> </toolbarpalette> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
toolbarseparator - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] creates a separator between groups of toolbar items.
... properties accessibletype examples <toolbox> <toolbar> <toolbarbutton label="button 1"/> <toolbarseparator /> <toolbarbutton label="button 2"/> </toolbar> </toolbox> attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statu...
toolbarset - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] firefox only this element is used as a container for custom toolbars, which are added in the custom toolbar dialog.
... examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, , boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, i...
toolbarspacer - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] firefox only a space between toolbar items.
... properties accessibletype examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
toolbarspring - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] firefox only a flexible space between toolbar items.
... properties accessibletype examples (example needed) attributes inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype type: integer a value indicating the type of accessibility object for the element.
tooltip - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element is used for the tooltip popups.
...more information is available in the
xul tutorial.
treeitem - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] a treeitem should be placed inside a treechildren element and should contain treerow elements.
... more information is available in the
xul tutorial.
treeseparator - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] used to place a separator row in a tree.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cur...
where - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] indicate a condition that must match for a template result to be used.
... inherited from
xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref...
wizardpage - Archive of obsolete content
«
xul reference home [ examples | attributes | properties | methods | related ] this element defines a page in a wizard.
... more information is available in the
xul tutorial.
CommandLine - Archive of obsolete content
handling command line arguments with
xulrunner for multiple instances application it's fairly easy to retrieve application specific command line arguments in
xulrunner when it's not a single instance application.
...r observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); observerservice.notifyobservers(window.arguments[0], "commandline-args-changed", null); addeventlistener("unload", observer.unregister, false); finally, add a reference in your application window to the observer: chrome/content/window.
xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" id="main" title="&window.title;" windowtype="
xulmine" style="width: 300px; height: 350px;" persist="screenx screeny width height sizemode"> <script type="application/javascript" src="cmdline.js" /> ...
toolkit.defaultChromeFeatures - Archive of obsolete content
type: string specified by: default prefs of
xulrunner applications default: "chrome,dialog=no,all" example: pref("toolkit.defaultchromefeatures", "chrome,resizable=no,dialog=no"); the toolkit.defaultchromefeatures preference allows simple
xulrunner-based applications to specify what features are passed to window.open() when the main application window is opened.
... see also:
xulrunner:specifying startup chrome window, dom:window.open, toolkit.defaultchromeuri, toolkit.singletonwindowtype.
toolkit.defaultChromeURI - Archive of obsolete content
type: string specified by: default prefs of
xulrunner applications default: none example: pref("toolkit.defaultchromeuri", "chrome://myapp/content/"); the toolkit.defaultchromeuri preference allows simple
xulrunner-based applications to open a new window when the application is launched.
...see also:
xulrunner:specifying startup chrome window, toolkit.defaultchromefeatures, toolkit.singletonwindowtype.
Mozilla release FAQ - Archive of obsolete content
mozilla has (at least) the following new features: xml support a highly configurable appearance (courtesy of
xul) publicly available source code :) http compression exists on more platforms mathml support (somewhat limited at the moment) a significantly faster rendering engine better html support (css 1 and partial css 2, dom 1 and partial dom 2) plug-in jvm support tabbed browsing message filtering an irc client why is the animated icon different?
...the xptoolkit docs might help in writing the needed
xul.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.platform - november 4th - november 10th, 2006 announcements no announcements this week traffic beaufour moves the discussion about
xulrunner unit-tests like xpcshell from mozilla.dev.platform to mozilla.dev.quality.
...william vanderpol asks, regarding remote
xul applications, if is it possible (or does it exist?) to have an extension that will allow chrome access to certain specified url's?
Sunbird Theme Tutorial - Archive of obsolete content
you also need knowledge of: using your operating system to create files and directories using the tools listed above css graphic design knowledge of
xul, xbl and javascript is useful for advanced themes.
...the basic interface is written in
xul, but some parts are constructed using xbl or javascript.
Theme changes in Firefox 3.5 - Archive of obsolete content
affected files details scrollbar.xml,
xulscrollbars.css the <gripper> element was removed from the scrollbar thumb button by bug 448704.
... browser.
xul bug 463189 added a new attribute on the
xul window element of browser.
xul named browsingmode.
XForms Secret Element - Archive of obsolete content
the password field is a text field, the value of which is hidden by asterisks (xhtml/
xul).
... characteristics analogous widgets are <xhtml:input type="password"/> and <
xul:textbox type="password"/> if the incremental attribute is present and has the value true, then the bound instance node is updated on every user input.
XForms Submit Element - Archive of obsolete content
representations the xforms submit element can be represented by the following widgets for the specified appearance attribute values: button - default representation (xhtml/
xul) link/clickable text - used when appearance = 'minimal' (xhtml only) button displaying a button is the default presentation (xhtml/
xul).
... characteristics analogous widgets are <html:input type="submit"/> and <
xul:button/> link/clickable text xforms authors can use this representation if they want to have a widget like a xhtml anchor (xhtml only).
XForms Textarea Element - Archive of obsolete content
representations the xforms textarea element is represented by a multiline text field (xhtml/
xul).
... characteristics analogous widgets are <xhtml:textarea/> and <
xul:textbox multiline="true"/> if the incremental attribute has the value true, then the bound instance node is updated on every user input.
XForms Trigger Element - Archive of obsolete content
representations the xforms trigger element can be represented by the following widgets for the specified appearance attribute values: button - default representation (xhtml/
xul) link/clickable text - used when appearance = 'minimal' (xhtml only) button displaying a button is the default presentation (xhtml/
xul).
... characteristics analogous widgets are <html:input type="button"/> and <
xul:button/> link/clickable text xforms authors can use this representation if they want to have a widget like a xhtml anchor (xhtml only).
Gecko FAQ - Gecko Redirect 1
for more information see
xul.
...see
xulrunner hall of fame for a partial list of application that use gecko via
xulrunner.
Information for Assistive Technology Vendors
gecko info for windows accessibility vendors mozilla supports msaa (microsoft active accessibility) in html and in our user interface (based on
xul technology).
... mozilla support for linux/unix assistive technology developers mozilla supports the at-spi (assistive technology service provider interface) in html and in our user interface (based on
xul technology).
Interface Compatibility
javascript/
xul interfaces traditional extensions written using
xul overlays and xpcom have access to the full power of the mozilla platform.
... jsapi, nspr, nss, and other libraries which are currently shipped as separate shared libraries may be integrated into lib
xul, and extension authors should avoid linking against them.
Cross Process Object Wrappers
*/ browsermm.loadframescript("chrome://my-addon/content/frame-script.js", false); browsermm.addmessagelistener("my-addon-message", function(message) { let wrapper = message.objects.element; wrapper.addeventlistener("click", function() { console.log("they clicked"); }); }); mapping content documents to
xul browsers a common pattern is to get the
xul <browser> that corresponds to a content document.
... to enable this, gbrowser.getbrowserfordocument and gbrowser.getbrowserforcontentwindow can be passed a cpow for the content document and content window, respectively, and return the
xul <browser> that these documents / windows belong to.
Limitations of chrome scripts
it used to be that if you registered a listener on the
xul <browser> or <tab> element that hosted some dom content, then events in the content would bubble up to the
xul and you could handle them there.
... with the shim the shim intercepts chrome process code that adds listeners to
xul elements and sets up listeners in the content process, relaying the result back to the chrome process.
Communicating with frame scripts
target the
xul <browser> element from which this message was sent.
...er(message) { console.log(message.name); console.log(message.sync); console.log(message.data); console.log(message.target); console.log(message.objects); } so combining this message listener with the message above will give console output somewhat like this, when the user clicks a <div>: "my-addon@me.org:my-e10s-extension-message" false object { details: "they clicked", tag: "div" } <
xul:browser anonid="initialbrowser" ...
Message manager overview
listener() : stop listening to a specific message interfaces nsiframescriptloader nsimessagelistenermanager nsimessagebroadcaster how to access you can access it as a property of the browser window: // chrome script let windowmm = window.messagemanager; browser message manager note that in this context, "browser" refers to the
xul <browser> object, which is a frame that hosts a single web document.
...his browser frame addmessagelistener() : start listening to a specific message from frame scripts removemessagelistener() : stop listening to a specific message interfaces nsiprocesschecker nsiframescriptloader nsimessagelistenermanager nsimessagesender how to access the browser message manager can be accessed as a property of the
xul <browser> element: // chrome script let browsermm = gbrowser.selectedbrowser.messagemanager; content process content frame message manager description there's a content frame message manager for every open tab.
Introduction to Layout in Mozilla
(tables, blocks,
xul boxes) reflow “global” reflows initial, resize, style-change processed immediately via presshell method incremental reflows targeted at a specific frame dirty, content-changed, style-changed, user-defined nshtmlreflowcommand object encapsulates info queued and processed asynchronously, nsipressshell::appendreflowcommand, processreflowco...
...invalid content) - harishd events - saari, joki block-and-line reflow - waterson, dbaron table reflow - karnaze form controls - rods, bryner style resolution and rule tree - dbaron views, widgets, and painting - roc, kmcclusk editor - kin, jfrancis
xul and box layout - hewitt, ben xbl - hewitt, ben conclusion data flow key data structures detailed walk-through incrementalism q & a?
Widget Wrappers
for
xul-provided widgets, this is always 'custom' provider the provider type of the widget, id est one of provider_api or provider_
xul instances an array of all instances (single window wrappers) of the widget.
...for
xul-provided widgets, this is always 'custom' provider the provider type of the widget, id est one of provider_api or provider_
xul node reference to the corresponding dom node anchor the anchor on which to anchor panels opened from this node.
source-editor.jsm
when using the default orion editor, this is a
xul <
xul:iframe> element.
...this may be either a string providing the id of a
xul <
xul:menupopup> or an element object of type <
xul:menupopup>.
Localization and Plurals
the following 3 file snippets show how to use pluralform with your .
xul, .properties, .js files.
... downloads.
xul: <stringbundleset> <stringbundle id="strings" src="chrome://downloads.properties"/> </stringbundleset> downloads.properties: # localization note (downloadstitlefiles): semi-colon list of plural forms.
Preference reference
the old behavior can be restored by setting the preference mail.tabs.drawintitlebar to false.nglayout.debug.disable
xul fastloadthe preference nglayout.debug.disable_
xul_fastload controls whether or not
xul fastload is used.nglayout.debug.disable_
xul_cacheto improve performance, mozilla caches chrome
xul documents the first time they load for faster loading later.
...the
xul cache is serialized and saved between mozilla sessions in the
xul fastload file, which saves a “compiled” version of the
xul and javascript in a document to disk for faster startup the next time the application runs.reader.parse-on-load.force-enabledthe preference reader.parse-on-load.force-enabled controls if the reader mode used in firefox mobile should be enabled independent of the memory available in the device.
Preferences
xul school: handling preferences the
xul school tutorial chapter on preferences.
... related topics
xul, javascript, xpcom, extensions, developing mozilla ...
Creating JavaScript jstest reftests
if your test needs to use browser-specific features, either: make the test silently pass if those features aren't present; or write a mochitest instead (preferred); or at the top of the test, add the comment // skip-if(
xulruntime.shell), so that it only runs in the browser.
... if your test needs to use shell-specific features, like gc(), either: make the test silently pass if those features aren't present; or make it a jit-test (so that it never runs in the browser); or at the top of the test, add the comment // skip-if(!
xulruntime.shell), so that it only runs in the shell.
Mozilla internal string guide
this guide documents the string classes which are visible to code within the mozilla codebase (code which is linked into lib
xul).
...outside of lib
xul you should use ns_free to deallocate the result when you no longer need it, inside lib
xul free() is preferred..
How To Pass an XPCOM Object to a New Window
a more useful example is available in the source code: toolkit/components/help/content/contexthelp.js#61 if you want to be able to call functions within an xpcom object from a
xul window's code, you can do so if you pass the xpcom object as one of the arguments to the window creation method.
... getservice(components.interfaces.nsiwindowwatcher); var win = ww.openwindow(null, "chrome://myextension/content/debug.
xul", "debug history", "chrome,centerscreen,resizable", myobject); note in this example that myobject is passed to the openwindow() method; you can pass any xpcom object (or any other value, for that matter) in this way.
XPConnect
xpconnect is part of firefox and is actively used in
xul applications.
... documentation architecture basics xpconnect, javascript, xpcom,
xul...
nsIAppStartup
note: only available with lib
xul builds.
... note: only available with lib
xul builds.
nsIBrowserBoxObject
layout/
xul/base/public/nsibrowserboxobject.idlscriptable please add a summary to this article.
... inherits from: nsicontainerboxobject last changed in gecko 1.9 (firefox 3) the boxobject belonging to a
xul browser element implements this interface.
nsIChromeRegistry
the extension, ext, is one of:
xul for a "content" package.
...the extension, ext, is one of:
xul for a "content" package.
nsICommandLineHandler
toolkit/components/commandlines/public/nsicommandlinehandler.idlscriptable handles arguments on the command line of a
xul application.
... see also nsicommandline chrome: command line
xulrunner:commandline ...
nsIContainerBoxObject
layout/
xul/base/public/nsicontainerboxobject.idlscriptable please add a summary to this article.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) the boxobject belonging to a
xul browser, editor or iframe element implements this interface.
nsIController
content/
xul/document/public/nsicontroller.idlscriptable an interface that can be implemented to receive and process commands and events.
...see also nsicommandcontroller nsicontrollers
xul tutorial/commands ...
nsIDOMChromeWindow
this method is called automatically on dialog element or wizard element of
xul.
... if some
xul applications create a dialog like window which has a default button but it's not created by the dialog/wizard element, the applications should call this method for the accessibility and the usability on windows at onload event.
nsIEditorBoxObject
layout/
xul/base/public/nsieditorboxobject.idlscriptable please add a summary to this article.
... inherits from: nsicontainerboxobject last changed in gecko 1.9 (firefox 3) the boxobject belonging to a
xul editor element implements this interface.
nsIFileView
example <?xml version="1.0" ?> <?xml-stylesheet href="chrome://global/skin/" type="text/css" ?> <window id="test" title="test" width="640" height="480" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul"> <tree flex="1" id="ftree"> <treecols> <-- the default column type is size unless an appropriate id is passed, nsifileview relies on the treecols section --> <treecol id="filenamecolumn" label="name" flex="1" primary="true"/> <treecol id="lastmodifiedcolumn" label="date" flex="1"/> <treecol id="size" label="size" flex="1"/> </...
...treecols> <treechildren/> </tree> <script> var dir="/home/"; //the directory to be opened var ftree = document.getelementbyid("ftree"); //the
xul tree element var lfile = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); lfile.initwithpath(dir); // open the directory var fview = components.classes["@mozilla.org/filepicker/fileview;1"] .createinstance(components.interfaces.nsifileview); //create an instance of the component tview = fview.queryinterface(components.interfaces.nsitreeview); //get the nsitreeview interface fview.setdirectory(lfile.queryinterface(components.interfaces.nsifile)); //set the directory fview.setfilter("*"); //add an appropriate file filter fview.sort(fview.sortname...
nsIIFrameBoxObject
layout/
xul/base/public/nsiiframeboxobject.idlscriptable please add a summary to this article.
... inherits from: nsicontainerboxobject last changed in gecko 1.9 (firefox 3) the boxobject belonging to a
xul iframe element implements this interface.
nsIMacDockSupport
this can be done like this: var docksupport = cc['@mozilla.org/widget/macdocksupport;1'].getservice(ci.nsimacdocksupport); console.log('docksupport:', docksupport); var win = services.wm.getmostrecentwindow('navigator:browser'); var macmenu = win.document.createelementns('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul', 'menupopup'); macmenu.setattribute('id', 'mymacmenu'); var macmenuitem = win.document.createelementns('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul', 'menuitem'); macmenuitem.setattribute('label', 'show most recent window'); macmenuitem.setattribute('id', 'mymacmenuitem'); macmenuitem.addeventlistener('command', function(){ var docksupport = cc['@mozilla.org/widget/macdocksup...
...var macmenuitem = services.appshell.hiddendomwindow.document.createelementns('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul', 'menuitem'); macmenuitem.setattribute('label', 'show most recent window'); macmenuitem.setattribute('id', 'mymacmenuitem'); macmenuitem.addeventlistener('command', function(){ var docksupport = cc['@mozilla.org/widget/macdocksupport;1'].getservice(ci.nsimacdocksupport); docksupport.activateapplication(true); services.wm.getmostrecentwindow(null).focus() }) services.appshell.hiddendomwindo...
nsIMenuBoxObject
layout/
xul/base/public/nsimenuboxobject.idlscriptable represents the box object for a
xul menu.
... inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) to get access to the box object for a given menu, use code like this: var boxobject =
xulmenu.boxobject.queryinterface(components.interfaces.nsimenuboxobject); method overview boolean handlekeypress(in nsidomkeyevent keyevent); void openmenu(in boolean openflag); attributes attribute type description activechild nsidomelement the currently active menu or menuitem child of the menu box.
nsIMessenger
if this window contains a messagepane element (i think this may mean a
xul:browser element with its id set to "messagepane"?), then the nsidocshell will be used for future nsimessenger operations.
... if there is no messagepane element, then the root
xul nsidocshell will be used (so that openurl() will still work).
nsIVersionComparator
and the return value is smaller than 0, then a < b equals 0 then version, then a==b is bigger than 0, then a > b example function compareversions(a,b) { var x = services.vc.compare(a,b); if(x == 0) return a + "==" + b; else if(x > 0) return a + ">" + b; return a + "<" + b; } dump(compareversions("1.0pre", "1.0")); example - compare current browser version this example here uses nsi
xulappinfo component to get the version of the browser that the code is running in.
... see here: nsi
xulappinfo components.utils.import("resource://gre/modules/services.jsm"); var curentbrowserversion = services.appinfo.platformversion; //example: '31.*' var comparetothisversion = '25.*'; var compareresult = services.vc.compare(curentbrowserversion, comparetothisversion); if (compareresult == -1) { //currentbrowserversion is less than '25.*' (comparetothisversion) } else if (compareresult == 0) { //currentbrowserversion is '25.*' (comparetothisversion) } else if (compareresult == 1) { //currentbrowserversion is greater than '25.*' (comparetothisversion) } else { //will never get here as services.vc.compare only returns -1, 0, or 1 } see also toolkit version format ...
nsIWebProgressListener
*/ let mm = window.getgroupmessagemanager("browsers"); mm.loadframescript("chrome://path/to/some/example-framescript.js", true); mm.addmessagelistener("myaddonmessage", (message) => { let data = message.data; let browser = message.target; let outerwindowid = data.outerwindowid; // browser is now the <
xul:browser> that saw the web progress activity // occur.
... let filter = cc["@mozilla.org/appshell/component/browser-status-filter;1"] .createinstance(ci.nsiwebprogress); filter.addprogresslistener(mylistener, ci.nsiwebprogress.notify_all); let webprogress = docshell.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebprogress); webprogress.addprogresslistener(filter, ci.nsiwebprogress.notify_all);
xulbrowserwindow.onstatechange (etc.) reporterlistener.onlocationchange ...
nsIWinTaskbar
for
xulrunner applications, the defaultgroupid attribute is configured using application.ini settings, and is of the format "vendor.application.version".
...see
xul application packaging for additional details.
nsIWindowWatcher
example for example, in a
xul application or mozilla extension, if the window object is unavailable (for example, when opening a window from xpcom component code), you might want to use this interface for opening a new window: var ww = components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getservice(components.interfaces.nsiwindowwatcher); var win = ww.openwindow(null, "chrome://myextension/con...
...tent/about.
xul", "aboutmyextension", "chrome,centerscreen", null); note: versions of gecko before gecko 2.0 would ignore some of the chrome flags when opening a chrome window without an opener window, instead behaving as if the "all" flag was present.
XPCOM Interface Reference
neresourcelistnsidomorientationeventnsidomparsernsidomprogresseventnsidomserializernsidomsimplegestureeventnsidomstoragensidomstorage2nsidomstorageeventobsoletensidomstorageitemnsidomstoragelistnsidomstoragemanagernsidomstoragewindownsidomuserdatahandlernsidomwindownsidomwindow2nsidomwindowinternalnsidomwindowutilsnsidomxpathevaluatornsidomxpathexceptionnsidomxpathexpressionnsidomxpathresultnsidom
xulcontrolelementnsidom
xulelementnsidom
xullabeledcontrolelementnsidom
xulselectcontrolelementnsidom
xulselectcontrolitemelementnsidatasignatureverifiernsidebugnsidebug2nsidevicemotionnsidevicemotiondatansidevicemotionlistenernsidialogcreatornsidialogparamblocknsidictionarynsidirindexnsidirindexlistenernsidirindexparsernsidirectoryenumeratornsidirectoryiteratornsidirectoryservicensidirectoryserviceprovi...
...owsshellservicensiworkernsiworkerfactorynsiworkerglobalscopensiworkermessageeventnsiworkermessageportnsiworkerscopensiwritablepropertybagnsiwritablepropertybag2nsixformsmodelelementnsixformsnsinstanceelementnsixformsnsmodelelementnsixmlhttprequestnsixmlhttprequesteventtargetnsixmlhttprequestuploadnsixpcexceptionnsixpcscriptablensixpconnectnsixsltexceptionnsixsltprocessornsixsltprocessorobsoletensi
xulappinfonsi
xulbrowserwindownsi
xulbuilderlistenernsi
xulruntimensi
xulsortservicensi
xultemplatebuildernsi
xultemplatequeryprocessornsi
xultemplateresultnsi
xulwindownsixmlrpcclientnsixmlrpcfaultnsizipentrynsizipreadernsizipreadercachensizipwriternsmsgfilterfileattribvaluensmsgfolderflagtypensmsgjunkstatusnsmsgkeynsmsglabelvaluensmsgpriorityvaluensmsgruleactiontypensmsgsearchattribnsmsgsearchopnsmsgsearch...
Generating xpt on Windows
in order to generate an .xpt file from an .idl file in recent versions of the gecko \
xul runner sdk in windows, you need to use the typelib.py script.
... assuming you installed your
xulrunner sdk at <mozsdkdir>, you then need to issue a command similar to c:\working-dir> <mozsdkdir>\sdk\bin\typelib.py <inputfile.idl> -o <outputfile.xpt> -i <mozsdkdir>\idl ...
Mozilla technologies
at the moment, the transition from webshell to docshell is not fully completed, but the long-term goal is to remove webshell and switch over entirely to docshell.embedded dialog apifeed content access apifirefox 2 and thunderbird 2 introduce a series of interfaces that make it easy for extension authors to access rss and atom feeds.life after
xul: building firefox interfaces with htmlthis page gathers technical solutions to common problems encountered by teams shipping html-based interfaces inside firefox.morkmork is a database file format invented by david mccusker for the mozilla code since the original netscape database information was proprietary and could not be released open source.
... toolkit apithe mozilla toolkit is a set of programming interfaces (apis) built on top of gecko which provide advanced services to
xul applications.
Building a Thunderbird extension 1: introduction
it shares many of the technologies used by mozilla firefox, including javascript, the gecko layout engine, the
xul xml user interface language and the xpcom cross-platform component object model.
...the tutorial has the following pages: introduction (this page) the extension filesystem (setting up your local system) install manifest (the install.rdf file that contains meta-information about the extension) chrome manifest (list of packages and overlays)
xul (the xml user interface language that is used to modify the thunderbird user interface) adding javascript (explains how to add some simple javascript to your thunderbird extension) installing locally (enabling the extension on your local thunderbird instance) packaging (making a distribution package that contains the extension) distributing (from your own site or from http://addons.mozilla.or...
DOM Inspector - Firefox Developer Tools
the dom inspector (also known as domi) is a developer tool used to inspect, browse, and edit the document object model of documents - usually web pages or
xul windows.
... this tool is an add-on for
xul-based applications such as firefox and thunderbird.
Attr.namespaceURI - Web APIs
if the namespaceuri returns the
xul namespace and the localname returns "browser", then the node is understood to be a
xul <browser/>.
... if (attribute.localname == "value" && attribute.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul") { // this is a
xul value } notes this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope.
Document.popupNode - Web APIs
when a popup attached via the popup or context attributes is opened, the
xul document's popupnode property is set to the node that was clicked on.
... this property applies only to
xul documents.
How to create a DOM tree - Web APIs
= doc.createelement("address"); addresselem5.setattribute("street", "321 south avenue"); addresselem5.setattribute("city", "denver"); addresselem5.setattribute("state", "co"); addresselem5.setattribute("country", "usa"); personelem2.appendchild(addresselem5); peopleelem.appendchild(personelem1); peopleelem.appendchild(personelem2); doc.appendchild(peopleelem); see also the dom chapter of the
xul tutorial.
...another application is that, since
xul is xml, the ui of your application can be dynamically manipulated, downloaded, uploaded, saved, loaded, converted, or transformed quite easily.
Element.namespaceURI - Web APIs
if the namespaceuri returns the
xul namespace and the localname returns "browser", then the node is understood to be a
xul <browser/>.
... if (element.localname == "browser" && element.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul") { // this is a
xul browser } notes this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope.
Node.namespaceURI - Web APIs
if the namespaceuri returns the
xul namespace and the localname returns "browser", then the node is understood to be a
xul <browser/>.
... if (node.localname == "browser" && node.namespaceuri == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul") { // this is a
xul browser } notes this is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope.
Window.content - Web APIs
this is useful in
xul windows that have a <browser> (or tabbrowser or <iframe>) with type="content-primary" attribute on it — the most famous example is firefox main window, browser.
xul.
... syntax var windowobject = window.content; example executing the following code in a chrome
xul window with a <browser type="content-primary"/> element in it draws a red border around the first div on the page currently displayed in the browser: content.document.getelementsbytagname("div")[0].style.border = "solid red 1px"; specification none.
Window - Web APIs
window.controllers read only returns the
xul controller objects for the current chrome window.
... window.maximize() fixme: needscontents window.minimize() (top-level
xul windows only) minimizes the window.
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
notes: this code requires elevated privileges to run; you can only call it from a browser extension or from a
xulrunner application.
... by setting the mozbackgroundrequest property of the request object and modifying the example appropriately, you can create your own alert dialog to handle ssl exceptions in your firefox extension or
xulrunner application.
Mozilla CSS extensions - CSS: Cascading Style Sheets
some of them apply only to
xul elements.
...:-moz-tree-cell-text(hover) :-moz-tree-checkbox :-moz-tree-column :-moz-tree-drop-feedback :-moz-tree-image :-moz-tree-indentation :-moz-tree-line :-moz-tree-progressmeter :-moz-tree-row :-moz-tree-row(hover) :-moz-tree-separator :-moz-tree-twisty u – x :-moz-ui-invalid :-moz-ui-valid :-moz-user-disabled ::-moz-viewport ::-moz-viewport-scroll :-moz-window-inactive ::-moz-
xul-anonymous-block at-rules @-moz-document media features -moz-mac-graphite-theme -moz-maemo-classic -moz-device-pixel-ratio -moz-os-version -moz-scrollbar-end-backward -moz-scrollbar-end-forward -moz-scrollbar-start-backward -moz-scrollbar-start-forward -moz-scrollbar-thumb-proportional -moz-touch-enabled -moz-windows-accent-color-in-titlebar -moz-windows-classic -moz-wind...
box-flex - CSS: Cascading Style Sheets
this is a property for controlling parts of the
xul box model.
... to make
xul elements in a containing box the same size, set the containing box's equalsize attribute to the value always.
Introduction to using XPath in JavaScript - XPath
<?xml version="1.0"?> <people xmlns:
xul = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.
xul" > <person> <name first="george" last="bush" /> <address street="1600 pennsylvania avenue" city="washington" country="usa"/> <phonenumber>202-456-1111</phonenumber> </person> <person> <name first="tony" last="blair" /> <address street="10 downing street" city="london" country="uk"/> <phonenumber>020 7925 0918</phonenumbe...
...r> </person> </people> to make the contents of the xml document available within the extension, we create an xmlhttprequest object to load the document synchronously, the variable xmldoc will contain the document as an xmldocument object against which we can use the evaluate method javascript used in the extensions
xul/js documents.
windows - Archive of obsolete content
model/core"); var { viewfor } = require("sdk/view/core"); var browserwindows = require("sdk/windows").browserwindows; function converttochromeandback(browserwindow) { // get the chrome window for this browserwindow var chromewindow = viewfor(browserwindow); // now we can use the chrome window api console.log(chromewindow.document.location.href); // -> "chrome://browser/content/browser.
xul" // convert back to the high-level window var highlevelwindow = modelfor(chromewindow); // now we can use the sdk's high-level window api console.log(highlevelwindow.title); } browserwindows.on("open", converttochromeandback); note that directly accessing low-level chrome objects like this means you're no longer protected by the compatibility guarantees made by the sdk's high-level api...
Creating a hybrid CD - Archive of obsolete content
text file" license ascii 'moss' 'text' "text file" .gif raw 'ogle' 'giff' "gif file" .png raw 'ogle' 'png ' "png file" .jpg raw 'ogle' 'jpeg' "jpeg file" .jpeg raw 'ogle' 'jpeg' "jpeg file" .pl ascii 'mcpl' 'text' "perl file" .pm ascii 'mcpl' 'text' "perl module file" .xml ascii 'r*ch' 'text' "xml file" .
xul ascii 'r*ch' 'text' "
xul file" .xbl ascii 'r*ch' 'text' "xbl file" .css ascii 'r*ch' 'text' "css file" .dtd ascii 'r*ch' 'text' "dtd file" .js ascii 'r*ch' 'text' "javascript file" .mp3 raw 'tvod' 'mpg3' "mpeg file" .mpg raw 'tvod' 'mpeg' "mpeg file" .mpeg raw 'tvod' 'mpeg' "mpeg file" .au raw '...
toolbarBindings.xml - Archive of obsolete content
copy the following text and paste it into a text file, then save that file as "toolbarbindings.xml": <bindings id="toolbarbindings"> <binding id="toolbar-primary" extends="chrome://global/content/bindings/toolbar.xml#toolbar-primary"> <content> <
xul:hbox class="toolbar-holder toolbar-primary-holder" flex="1" xbl:inherits="orient=tborient,buttonstyle"> <
xul:hbox class="toolbar-button-box" flex="1"> <children/> </
xul:hbox> <
xul:image class="toolbar-primary-icon" xbl:inherits="buttonstyle"/> </
xul:hbox> </content> </binding> </bindings> ...
Code snippets - Archive of obsolete content
ervice.storageurl + collection, recordtype); coll.full = true; coll.limit = null; coll.recordhandler = function(item) { item.collection = collection; item.decrypt(); if (item.deleted) { deleted++; } else { items[item.type] = 1 + (items[item.type] || 0); } }; coll.get(); console.log("deleted: " + deleted + ", " + json.stringify(items)); get a log from
xul fennec view about:sync-log.
jspage - Archive of obsolete content
useout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:1,unload:1,beforeunload:2,resize:1,move:1,domcontentloaded:1,readystatechange:1,error:1,abort:1,scroll:1}; (function(){var a=function(b){var c=b.relatedtarget;if(c==undefined){return true;}if(c===false){return false;}return($type(this)!="document"&&c!=this&&c.prefix!="
xul"&&!this.haschild(c)); };element.events=new hash({mouseenter:{base:"mouseover",condition:a},mouseleave:{base:"mouseout",condition:a},mousewheel:{base:(browser.engine.gecko)?"dommousescroll":"mousewheel"}}); })();element.properties.styles={set:function(a){this.setstyles(a);}};element.properties.opacity={set:function(a,b){if(!b){if(a==0){if(this.style.visibility!="hidden"){this.style.visibility="hid...
Extensions - Archive of obsolete content
see the prism main window
xul file for the actual structure: webrunner.
xulporting an existing extension since there aren't many extensions designed explicitly for prism, you may need to port your favorite extensions.
Styling - Archive of obsolete content
the folder names must match the following: windows - winnt mac os x - darwin linux - linux the folder names are pulled from mozilla and are the same as those used in other mozilla projects, such as extension and
xul applications.
Proxy UI - Archive of obsolete content
mouseover when online, the tooltip will include the current proxy mode: code http://mxr.mozilla.org/seamonkey/sou...ityoverlay.
xul bugs bug 243624 reference network.proxy.type ...
Table Layout Regression Tests - Archive of obsolete content
o " /> <text data="0 0 0 normal normal 0[0x0]tw normal " /> <textreset data="0 10[0xa]enum " /> <display data="0 1 0 0 0 0 0 0 0 0 0 0 " /> <visibility data="0 1 1.000000" /> <table data="0 0 4 -1 1 " /> <tableborder data="1 null null 0 2 " /> <content data="0 0 0 null " /> <quotes data="0 " /> <ui data="3 0 0 1 " /> <uireset data="7 0 4" /> <
xul data="0 0 0 0 0 1 <svg data="0 1.000000 1.000000 0 1.000000" /> </stylecontext> the baseline log will look like: type manifest file: e:\moz_src\mozilla\obj-i586-pc-msvc\dist\bin\components\xpti.dat +++ javascript debugging hooks installed.
XML in Mozilla - Archive of obsolete content
svg w3c recommendation svg animation (smil) w3c recommendation mathml w3c recommendation mathml p3p (no longer supported) w3c recommendation p3p wsdl (no longer supported) w3c note web services xbl mozilla's xbl reference
xul mozilla's
xul reference roadmap next big tasks would include support for xpointer xpointer() scheme (bug 32832), xinclude (bug 201754), xml catalogs (bug 98413), xforms (bug 97806; work being done on implementing this as an extension), validating parser (bug 196355) and xml schemas.
BloatView
leaks delta bloat delta -------------------------------------------------------------------------- total 6113530 2.79% 67064808 9.18% stylecontextimpl 265440 81.19% 283584 -26.99% ctoken 236500 17.32% 306676 20.64% nsstr 217760 14.94% 5817060 7.63% ns
xulattribute 113048 -70.92% 113568 -71.16% literalimpl 53280 26.62% 75840 19.40% ns
xulelement 51648 0.00% 51648 0.00% nsprofile 51224 0.00% 51224 0.00% nsframe 47568 -26.15% 48096 -50.49% cssdeclarationimpl 42984 0.67% 43488 0.67...
DMD
#01: replace_malloc (/home/njn/moz/mi5/go64dmd/memory/replace/dmd/../../../../memory/replace/dmd/dmd.cpp:1286) #02: malloc (/home/njn/moz/mi5/go64dmd/memory/build/../../../memory/build/replace_malloc.c:153) #03: moz_xmalloc (/home/njn/moz/mi5/memory/mozalloc/mozalloc.cpp:84) #04: nscyclecollectingautorefcnt::incr(void*, nscyclecollectionparticipant*) (/home/njn/moz/mi5/go64dmd/dom/
xul/../../dist/include/nsisupportsimpl.h:250) #05: ns
xulelement::create(ns
xulprototypeelement*, nsidocument*, bool, bool,mozilla::dom::element**) (/home/njn/moz/mi5/dom/
xul/ns
xulelement.cpp:287) #06: nsxblcontentsink::createelement(char16_t const**, unsigned int, mozilla::dom::nodeinfo*, unsigned int, nsicontent**, bool*, mozilla::dom::fromparser) (/home/njn/moz/mi5/dom/xbl/nsxblcontentsink.c...
Leak-hunting strategies and tips
seeing a leaked globalwindowimpl, ns
xulpdglobalobject, nsxbldocglobalobject, or nsxpcwrappedjs is a sign that there could be significant numbers of js objects leaked.) for example, start with bringing up the mail window and closing the window without doing anything.
TimerFirings logging
2088737280[7f606bf68140]: [30710] fn timer (one_shot 16 ms): [from dladdr] #0: ???[/home/njn/moz/mi1/o64/dist/bin/lib
xul.so +0x2144f94] 2088737280[7f606bf68140]: [30710] fn timer (one_shot 16 ms): [from dladdr] #0: mozilla::refreshdrivertimer::timertick(nsitimer*, void*) (/home/njn/moz/mi1/o64/layout/b third, on other platforms dladdr is not implemented or doesn't work well, and the output will look like the followin.
Performance
xul school: add-on performance tips for add-on developers to help them avoid impairing application performance.
Installing JSHydra
converting html,
xul, or xbl files into a readable js equivalent is a work in progress, as is accounting for the preprocessing that mozilla files sometimes use.
Leak And Bloat Tests
code locations the files specific to leak and bloat testing are be stored in: http://mxr.mozilla.org/comm-central/source/mailnews/test/performance these files consist of: overlays (used to provide the hooks for the javascript): bloat/bloataddroverlay.
xul bloat/bloatcomposeoverlay.
xul bloat/bloatmainoverlay.
xul javascript files (used to drive the tests): bloat/bloataddroverlay.js bloat/bloatcomposeoverlay.js bloat/bloatmainoverlay.js preference settings (used to provide a defined profile, see below): common/mailnewstestprefs.js python scripts (used to set up the profile and run the test): bloat/setupbloattest.py bloat/runtest.py common/se...
McCoy
mccoy uses
xulrunner which is bound to break, for details see this post.
NSS_3.12_release_notes.html
ug 396256: certutil and pp do not print all the generalnames in a crldp extension bug 398019: correct confusing and erroneous comments in der_asciitotime bug 422866: vfychain -pp command crashes in nss_shutdown bug 345779: useless assignment statements in ec_gf2m_pt_mul_mont bug 349011: please stop exporting these crmf_ symbols bug 397178: crash when entering chrome://pippki/content/resetpassword.
xul in url bar bug 403822: pkix_pl_ocsprequest_create can leave some members uninitialized bug 403910: cert_findusercertbyusage() returns wrong certificate if multiple certs with same subject available bug 404919: memory leak in sftkdb_readsecmoddb() (sftkmod.c) bug 406120: allow application to specify ocsp timeout bug 361025: support for camellia cipher suites to tls rfc4132 bug 376417: pk11_genera...
FOSS
flusspferd - (newer) c++ bindings libjspp - c++ template based library for extending & embedding spidermonkey; works with spidermonkey 1.8.5 and above, has lots of goodies spiderape - the oldest c++ bindings for spidermonkey tri
xul - (tri
xul cvs) - tri
xul xml-based gui toolkit embeds spidermonkey, using javascript to implement logic behind its gui, supporting calls from javascript to c++ objects rust mozjs - rust bindings used by servo gnome gjs - javascript bindings to gnome (broadly, to any library using the gobject introspection mechanism) objective caml http://alain.frisch.fr/soft.html#spider - bindings t...
Index
518 parser api api, guide, javascript, spidermonkey example: 519 profiling spidermonkey guide 1.) get yourself an optimized lib
xul build of firefox, with debugger info.
SpiderMonkey Internals
(
xul fastload uses this.) just-in-time compiler spidermonkey contains a baseline compiler as first tier.
JS_SetOptions
mxr id search for jsoption_compile_n_go jsoption_atline //@line number ["filename"] option supported for the
xul preprocessor and kindred beasts.
Mozilla Projects
it provides a number of functions and capabilities, including: mccoy mccoy uses
xulrunner which is bound to break, for details see this post.
Gecko events
is supported: yes targets: table_cell - the cell of <
xul:tree/>, any accessible for html element when @title or @alt attribute is changed.