Skip to content

Commit f5c50dd

Browse files
committed
Widget: Document return value of _trigger. Fixes jquery#168 - Base widget _trigger: Return value undocumented
1 parent 054fdca commit f5c50dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

entries/jQuery.widget.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,13 @@
298298
<desc>The element(s) to apply the focusable behavior to.</desc>
299299
</argument>
300300
</method>
301-
<method name="_trigger">
301+
<method name="_trigger" return="Boolean">
302302
<desc>
303303
Triggers an event and its associated callback.
304304
<p>The option with the name equal to type is invoked as the callback.</p>
305305
<p>The event name is the widget name + type.</p>
306306
<p><em>Note: When providing data, you must provide all three parameters. If there is no event to pass along, just pass <code>null</code>.</em></p>
307+
<p>If the default action is prevented, <code>false</code> will be returned, otherwise <code>true</code>. Preventing the default action happens when the handler returns <code>false</code> or calls <code>event.preventDefault()</code>.</p>
307308
</desc>
308309
<argument name="type" type="String">
309310
<desc>The <code>type</code> should match the name of a callback option. The full event type will be generated automatically.</desc>

0 commit comments

Comments
 (0)