/
widget-method-option.xml
36 lines (36 loc) · 1.83 KB
/
widget-method-option.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0"?>
<method name="option" return="jQuery">
<desc>
Sets one or more options for the <placeholder name="name"/>.
</desc>
<signature return="Object" example-return-var="isDisabled" example-params='"disabled"'>
<desc>
<p>Gets the value currently associated with the specified <code>optionName</code>.</p>
<p><strong>Note:</strong> For options that have objects as their value, you can get the value of a specific key by using dot notation. For example, <code>"foo.bar"</code> would get the value of the <code>bar</code> property on the <code>foo</code> option.</p>
</desc>
<argument name="optionName" type="String">
<desc>The name of the option to get.</desc>
</argument>
</signature>
<signature return="PlainObject" example-return-var="options">
<desc>Gets an object containing key/value pairs representing the current <placeholder name="name"/> options hash.</desc>
</signature>
<signature example-params='"disabled", true'>
<desc>
<p>Sets the value of the <placeholder name="name"/> option associated with the specified <code>optionName</code>.</p>
<p><strong>Note:</strong> For options that have objects as their value, you can set the value of just one property by using dot notation for <code>optionName</code>. For example, <code>"foo.bar"</code> would update only the <code>bar</code> property of the <code>foo</code> option.</p>
</desc>
<argument name="optionName" type="String">
<desc>The name of the option to set.</desc>
</argument>
<argument name="value" type="Object">
<desc>A value to set for the option.</desc>
</argument>
</signature>
<signature example-params="{ disabled: true }">
<desc>Sets one or more options for the <placeholder name="name"/>.</desc>
<argument name="options" type="Object">
<desc>A map of option-value pairs to set.</desc>
</argument>
</signature>
</method>