Home
Categories
Dictionnary
Download
Project Details
Changes Log
FAQ
License

XUL scripts


A XUL script is an XML file specifying a GUI and containing:
  • The declaration of the UI using XUL controls
  • The declaration of the scripts used to interact with the controls. As for HTML files, these scripts can refer to external script files, or be embedded in the XUL file

Example

Main Article: Hello world tutorial

Suppose the following XUL script:

      <?xml version="1.0"?>
      <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
      <window id="Hello" title="Hello" orient="horizontal" width="250" height="100" screenX="500" screenY="500"      
      xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
         <script>
      function clicked(){
      alert('Hello World!');
      }
         </script>    
         <button label="Push Me!" oncommand="clicked()" />
      </window>     

See also


Categories: general

Copyright 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence