Getter
Defines code which is called to retrieve the value of a property. The code should return the value of the property.
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>
プロパティの値を取得するために呼ばれるコードを定義する。このコードは対応するプロパティの値を返す必要がある。
例 :
<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>
属性:
id |
属性:
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.
型 : 要素 id。ウィンドウ内で一意でなければならない。
getter を識別できるユニークな識別子。getElementById や他の DOM 関数へのパラメータとして、またスタイルシートの要素への参照として使用することができる。