Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

XUL document



The XULDocument is the class which represents one XUL file.

Getting the current document

On XUL Javascript scripts, the current document is always accessible by the document property, such as:
      var widget = document.getElementById("open");
On other script type, you can get it through the XUL ScriptHelper:
      XULDocument doc = helper.getCurrentDocument();

Getting a widget in the tree

You can get any widget in the tree (providing it has an ID attribute) with the following method:
  • getWidget(java.lang.String)
On XUL 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:
  • On the current document: document.getCurrentWidget()
  • On the XUL ScriptHelper: helper.getCurrentWidget()
You can get the current window which is the root of the widget which is at the origin of the last user event by:
  • On the current document: document.getCurrentWindow()
  • On the XUL ScriptHelper: helper.getCurrentWindow()
For example in Javascript:
      var widget = document.getcurrentWindow();

See also


Categories: builtin-applis

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence