mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-06 16:20:26 +08:00
jQuery: Added one / ready JSDoc
This commit is contained in:
Vendored
+49
-3
@@ -1022,10 +1022,56 @@ interface JQuery {
|
||||
*/
|
||||
on(events: { [key: string]: any; }, selector?: any, data?: any): JQuery;
|
||||
|
||||
one(events: string, selector?: any, data?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
|
||||
one(eventsMap: { [key: string]: any; }, selector?: any, data?: any): JQuery;
|
||||
/**
|
||||
* Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
|
||||
*
|
||||
* @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
|
||||
* @param handler A function to execute at the time the event is triggered.
|
||||
*/
|
||||
one(events: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
|
||||
/**
|
||||
* Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
|
||||
*
|
||||
* @param events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names.
|
||||
* @param data An object containing data that will be passed to the event handler.
|
||||
* @param handler A function to execute at the time the event is triggered.
|
||||
*/
|
||||
one(events: string, data: Object, handler: (eventObject: JQueryEventObject) => any): JQuery;
|
||||
|
||||
ready(handler: any): JQuery;
|
||||
/**
|
||||
* Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
|
||||
*
|
||||
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
||||
* @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
|
||||
* @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
|
||||
*/
|
||||
one(events: string, selector: string, handler: (eventObject: JQueryEventObject) => any): JQuery;
|
||||
/**
|
||||
* Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
|
||||
*
|
||||
* @param events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin".
|
||||
* @param selector A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element.
|
||||
* @param data Data to be passed to the handler in event.data when an event is triggered.
|
||||
* @param handler A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
|
||||
*/
|
||||
one(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
|
||||
|
||||
/**
|
||||
* Attach a handler to an event for the elements. The handler is executed at most once per element per event type.
|
||||
*
|
||||
* @param events An object in which the string keys represent one or more space-separated event types and optional namespaces, and the values represent a handler function to be called for the event(s).
|
||||
* @param selector A selector string to filter the descendants of the selected elements that will call the handler. If the selector is null or omitted, the handler is always called when it reaches the selected element.
|
||||
* @param data Data to be passed to the handler in event.data when an event occurs.
|
||||
*/
|
||||
one(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
|
||||
|
||||
|
||||
/**
|
||||
* Specify a function to execute when the DOM is fully loaded.
|
||||
*
|
||||
* @param handler A function to execute after the DOM is ready.
|
||||
*/
|
||||
ready(handler: Function): JQuery;
|
||||
|
||||
resize(handler: (eventObject: JQueryEventObject) => any): JQuery;
|
||||
resize(eventData?: any, handler?: (eventObject: JQueryEventObject) => any): JQuery;
|
||||
|
||||
Reference in New Issue
Block a user