Home > Element Reference : Getter

Contents

### 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:

Attributes inherited from Element

class

The style class of the xbl:getter. Multiple classes may be specified by separating them with spaces.

id

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

Copyright (C) 1999 - 2002 XULPlanet.com