WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

Getter

Defines code which is called to retrieve the value of a property. The code should return the value of the property.

More information about getter

Example:

    <property name="time">
      <getter>
       <![CDATA[
        var hour=this.getAttribute("hour");
        var minute=this.getAttribute("minute");
        var second=this.getAttribute("second");
        return hour + ":" + minute + ":" + second;
       ]]>
      </getter>
    </property>

Attributes:

id

Attributes:

id

Type: element id, must be unique in the window

A unique identifier so that you can identify the getter with. You can use this as a parameter to getElementById and other DOM functions and to reference the element in style sheets.

Copyright © 1999-2006 XULPlanet.com