JQueryStatic.hx 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. /* This file is generated, do not edit! Visit http://api.jquery.com/ for API documentation. */
  2. package js.jquery;
  3. @:final @:native("$") extern class JQueryStatic {
  4. /**
  5. Set default values for future Ajax requests. Its use is not recommended.
  6. **/
  7. static public function ajaxSetup(options:Dynamic):Void;
  8. /**
  9. Creates an object that handles the actual transmission of Ajax data.
  10. **/
  11. static public function ajaxTransport(dataType:String, handler:Dynamic -> Dynamic -> js.jquery.JqXHR -> Void):Void;
  12. /**
  13. Check to see if a DOM element is a descendant of another DOM element.
  14. **/
  15. static public function contains(container:js.html.Element, contained:js.html.Element):Bool;
  16. /**
  17. Check to see if a DOM node is within an XML document (or is an XML document).
  18. **/
  19. static public function isXMLDoc(node:js.html.Element):Bool;
  20. /**
  21. Returns value at named data store for the element, as set by <code>jQuery.data(element, name, value)</code>, or the full data store for the element.
  22. **/
  23. @:overload(function(element:js.html.Element, key:String):Dynamic { })
  24. @:overload(function(element:js.html.Element, key:String, value:Dynamic):Dynamic { })
  25. static public function data(element:js.html.Element):Dynamic;
  26. /**
  27. Determine whether the argument is a window.
  28. **/
  29. static public function isWindow(obj:Dynamic):Bool;
  30. /**
  31. Remove a previously-stored piece of data.
  32. **/
  33. static public function removeData(element:js.html.Element, ?name:String):js.jquery.JQuery;
  34. /**
  35. Provides a way to execute callback functions based on one or more objects, usually <a href="/category/deferred-object/">Deferred</a> objects that represent asynchronous events.
  36. **/
  37. static public function when(deferreds:haxe.extern.Rest<js.jquery.Deferred>):js.jquery.Promise;
  38. /**
  39. A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
  40. **/
  41. @:overload(function(object:Dynamic, callback:String -> Dynamic -> Void):Dynamic { })
  42. static public function each(array:Array<Dynamic>, callback:Int -> Dynamic -> Void):Dynamic;
  43. /**
  44. Execute the next function on the queue for the matched element.
  45. **/
  46. static public function dequeue(element:js.html.Element, ?queueName:String):Void;
  47. /**
  48. Search for a specified value within an array and return its index (or -1 if not found).
  49. **/
  50. static public function inArray(value:Dynamic, array:Array<Dynamic>, ?fromIndex:Float):Float;
  51. /**
  52. Load a JavaScript file from the server using a GET HTTP request, then execute it.
  53. **/
  54. static public function getScript(url:String, ?success:String -> String -> js.jquery.JqXHR -> Void):js.jquery.JqXHR;
  55. /**
  56. Relinquish jQuery's control of the <code>$</code> variable.
  57. **/
  58. static public function noConflict(?removeAll:Bool):Dynamic;
  59. /**
  60. Create a serialized representation of an array, a plain object, or a jQuery object suitable for use in a URL query string or Ajax request. In case a jQuery object is passed, it should contain input elements with name/value properties.
  61. **/
  62. @:overload(function(obj:haxe.extern.EitherType<Array<Dynamic>, haxe.extern.EitherType<Dynamic, js.jquery.JQuery>>, traditional:Bool):String { })
  63. static public function param(obj:haxe.extern.EitherType<Array<Dynamic>, haxe.extern.EitherType<Dynamic, js.jquery.JQuery>>):String;
  64. /**
  65. Determine if the argument passed is a JavaScript function object.
  66. **/
  67. static public function isFunction(obj:Dynamic):Bool;
  68. /**
  69. Takes a function and returns a new one that will always have a particular context.
  70. **/
  71. @:overload(function(context:Dynamic, name:String):haxe.Constraints.Function { })
  72. @:overload(function(_function:haxe.Constraints.Function, context:Dynamic, ?additionalArguments:Dynamic):haxe.Constraints.Function { })
  73. @:overload(function(context:Dynamic, name:String, ?additionalArguments:Dynamic):haxe.Constraints.Function { })
  74. static public function proxy(_function:haxe.Constraints.Function, context:Dynamic):haxe.Constraints.Function;
  75. /**
  76. Remove the whitespace from the beginning and end of a string.
  77. **/
  78. static public function trim(str:String):String;
  79. /**
  80. Hook directly into jQuery to override how particular CSS properties are retrieved or set, normalize CSS property naming, or create custom properties.
  81. **/
  82. static public var cssHooks : Dynamic;
  83. /**
  84. Determine whether the argument is an array.
  85. **/
  86. static public function isArray(obj:Dynamic):Bool;
  87. /**
  88. Convert an array-like object into a true JavaScript array.
  89. **/
  90. static public function makeArray(obj:Dynamic):Array<Dynamic>;
  91. /**
  92. Holds or releases the execution of jQuery's ready event.
  93. **/
  94. static public function holdReady(hold:Bool):Void;
  95. /**
  96. Translate all items in an array or object to new array of items.
  97. **/
  98. @:overload(function(object:Dynamic, callback:Dynamic -> String -> Dynamic):Array<Dynamic> { })
  99. static public function map(array:Array<Dynamic>, callback:Dynamic -> Int -> Dynamic):Array<Dynamic>;
  100. /**
  101. Show the queue of functions to be executed on the matched element.
  102. **/
  103. @:overload(function(element:js.html.Element, queueName:String, newQueue:Array<Void -> Void>):js.jquery.JQuery { })
  104. @:overload(function(element:js.html.Element, queueName:String, callback:haxe.Constraints.Function):js.jquery.JQuery { })
  105. static public function queue(element:js.html.Element, ?queueName:String):Array<Void -> Void>;
  106. /**
  107. Parses a string into an array of DOM nodes.
  108. **/
  109. static public function parseHTML(data:String, ?context:js.html.Element, ?keepScripts:Bool):Array<js.html.Element>;
  110. /**
  111. Perform an asynchronous HTTP (Ajax) request.
  112. **/
  113. @:overload(function(url:String, ?settings:Dynamic):js.jquery.JqXHR { })
  114. static public function ajax(?settings:Dynamic):js.jquery.JqXHR;
  115. /**
  116. Takes a string and throws an exception containing it.
  117. **/
  118. static public function error(message:String):Void;
  119. /**
  120. Merge the contents of two arrays together into the first array.
  121. **/
  122. static public function merge(first:haxe.extern.EitherType<Array<Dynamic>, js.html.NodeList>, second:haxe.extern.EitherType<Array<Dynamic>, js.html.NodeList>):Array<Dynamic>;
  123. /**
  124. Parses a string into an XML document.
  125. **/
  126. static public function parseXML(data:String):js.html.Document;
  127. /**
  128. Check to see if an object is empty (contains no enumerable properties).
  129. **/
  130. static public function isEmptyObject(object:Dynamic):Bool;
  131. /**
  132. Handle custom Ajax options or modify existing options before each request is sent and before they are processed by <code>$.ajax()</code>.
  133. **/
  134. static public function ajaxPrefilter(?dataTypes:String, handler:Dynamic -> Dynamic -> js.jquery.JqXHR -> Void):Void;
  135. /**
  136. Execute some JavaScript code globally.
  137. **/
  138. static public function globalEval(code:String):Void;
  139. /**
  140. Load JSON-encoded data from the server using a GET HTTP request.
  141. **/
  142. static public function getJSON(url:String, ?data:haxe.extern.EitherType<Dynamic, String>, ?success:Dynamic -> String -> js.jquery.JqXHR -> Void):js.jquery.JqXHR;
  143. /**
  144. Finds the elements of an array which satisfy a filter function. The original array is not affected.
  145. **/
  146. static public function grep(array:Array<Dynamic>, _function:Dynamic -> Int -> Bool, ?invert:Bool):Array<Dynamic>;
  147. /**
  148. Merge the contents of an object onto the jQuery prototype to provide new jQuery instance methods.
  149. **/
  150. static public function fn(object:Dynamic):Dynamic;
  151. /**
  152. Load data from the server using a HTTP POST request.
  153. **/
  154. @:overload(function(url:String, ?data:haxe.extern.EitherType<Dynamic, String>, ?success:Dynamic -> String -> js.jquery.JqXHR -> Void, ?dataType:String):js.jquery.JqXHR { })
  155. static public function post(settings:Dynamic):js.jquery.JqXHR;
  156. /**
  157. A factory function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.
  158. **/
  159. static public function Deferred(?beforeStart:js.jquery.Deferred -> Void):js.jquery.Deferred;
  160. /**
  161. A multi-purpose callbacks list object that provides a powerful way to manage callback lists.
  162. **/
  163. static public function Callbacks(flags:String):js.jquery.Callbacks;
  164. /**
  165. An empty function.
  166. **/
  167. static public function noop():Void;
  168. /**
  169. Determines whether its argument is a number.
  170. **/
  171. static public function isNumeric(value:Dynamic):Bool;
  172. /**
  173. Check to see if an object is a plain object (created using "{}" or "new Object").
  174. **/
  175. static public function isPlainObject(object:Dynamic):Bool;
  176. /**
  177. Takes a well-formed JSON string and returns the resulting JavaScript value.
  178. **/
  179. static public function parseJSON(json:String):haxe.extern.EitherType<String, haxe.extern.EitherType<Float, haxe.extern.EitherType<Dynamic, haxe.extern.EitherType<Array<Dynamic>, Bool>>>>;
  180. /**
  181. A collection of properties that represent the presence of different browser features or bugs. Intended for jQuery's internal use; specific properties may be removed when they are no longer needed internally to improve page startup performance. For your own project's feature-detection needs, we strongly recommend the use of an external library such as <a href="http://modernizr.com">Modernizr</a> instead of dependency on properties in <code>jQuery.support</code>.
  182. **/
  183. static public var support : Dynamic;
  184. /**
  185. Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers.
  186. **/
  187. static public function unique(array:Array<js.html.Element>):Array<js.html.Element>;
  188. /**
  189. An object containing all CSS properties that may be used without a unit. The <a href="/css/"><code>.css()</code></a> method uses this object to see if it may append <code>px</code> to unitless values.
  190. **/
  191. static public var cssNumber : Dynamic;
  192. /**
  193. Determine whether an element has any jQuery data associated with it.
  194. **/
  195. static public function hasData(element:js.html.Element):Bool;
  196. /**
  197. Merge the contents of two or more objects together into the first object.
  198. **/
  199. @:overload(function(?deep:Bool, target:Dynamic, object1:Dynamic, ?objectN:Dynamic):Dynamic { })
  200. static public function extend(target:Dynamic, ?object1:Dynamic, ?objectN:Dynamic):Dynamic;
  201. static public var fx : { /**
  202. The rate (in milliseconds) at which animations fire.
  203. **/
  204. var interval : Float; /**
  205. Globally disable all animations.
  206. **/
  207. var off : Bool; };
  208. /**
  209. Load data from the server using a HTTP GET request.
  210. **/
  211. @:overload(function(url:String, ?data:haxe.extern.EitherType<Dynamic, String>, ?success:Dynamic -> String -> js.jquery.JqXHR -> Void, ?dataType:String):js.jquery.JqXHR { })
  212. static public function get(settings:Dynamic):js.jquery.JqXHR;
  213. /**
  214. Return a number representing the current time.
  215. **/
  216. static public function now():Float;
  217. /**
  218. Determine the internal JavaScript [[Class]] of an object.
  219. **/
  220. static public function type(obj:Dynamic):String;
  221. }