id
attribute which allow them to be searchable in their parent XULDocument.<window id="Test" title="Test XULScripts" orient="horizontal" onload="loaded()" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function clicked() { document.getElementById("theButton").label = "No"; } </script> <button id="theButton" label="Yes" oncommand="clicked()" /> </window>
id
attribute) with the following method:
On Javascript scripts, you can also use the document
property, such as: var widget = document.getElementById("open");You can get the current widget which is the source of the last user event by one of the following methods:
var widget = document.getcurrentWindow();
Copyright 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence