Attaches a method to the object that contains this element. The method must have
a name
.
The name
attribute allows the method to be invoked from
JavaScript with this name. For example, if a method is defined via:
<view id="obj"> <method name="f" args="a, b"> return a+b; </method> </view>
then script code can invoke obj.f(1, 2)
to add two numbers.
Name (CSS property) | Type (tag) | Type (js) | Default | Category |
---|---|---|---|---|
allocation
|
"instance" | "class" | String | "instance" | initialize-only |
One of:
You can set <attribute name="allowed" value="false" type="boolean" allocation="class" /> |
||||
args
|
string | initialize-only | ||
The parameter names of this method. The value of this attribute is a comma-separated list of JavaScript identifiers. | ||||
name
|
token | initialize-only | ||
The name of a variable that will be set to this object when the application is started. If this element is directly within a canvas or library element, the global variable and the canvas property with this name will be set to this object. If this element is within another object, that object's property with this name will be set to this object. |
Copyright © 2002-2010 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.