Browse Source

Regenerated extern using api.jquery.com v1.12.5. Support jQuery 3.0. Deprecated fields are generated but marked with @:deprecated.

Andy Li 9 years ago
parent
commit
4e6cd629e8
5 changed files with 99 additions and 4 deletions
  1. 7 0
      extra/CHANGES.txt
  2. 14 1
      std/js/jquery/Deferred.hx
  3. 50 1
      std/js/jquery/JQuery.hx
  4. 14 1
      std/js/jquery/JqXHR.hx
  5. 14 1
      std/js/jquery/Promise.hx

+ 7 - 0
extra/CHANGES.txt

@@ -1,3 +1,10 @@
+2016-??-??: 3.3.0-RC2
+
+	General improvements and optimizations:
+
+	js : updated jQuery extern (js.jquery.*) for jQuery 1.12.4 / 3.0.0 support.
+	js : jQuery extern (js.jquery.*) now includes deprecated fields marked with @:deprecated.
+
 2016-05-27: 3.3.0-RC1
 
 	New features:

+ 14 - 1
std/js/jquery/Deferred.hx

@@ -13,6 +13,16 @@ package js.jquery;
 		Add handlers to be called when the Deferred object is rejected.
 	**/
 	public function fail(failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, ?failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Deferred;
+	/**
+		Determine whether a Deferred object has been rejected.
+	**/
+	@:deprecated("Deprecated since jQuery 1.7")
+	public function isRejected():Bool;
+	/**
+		Determine whether a Deferred object has been resolved.
+	**/
+	@:deprecated("Deprecated since jQuery 1.7")
+	public function isResolved():Bool;
 	/**
 		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.
 	**/
@@ -29,6 +39,7 @@ package js.jquery;
 	/**
 		Utility method to filter and/or chain Deferreds.
 	**/
+	@:deprecated("Deprecated since jQuery 1.8")
 	@:overload(function(?doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise { })
 	public function pipe(?doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function):js.jquery.Promise;
 	/**
@@ -62,5 +73,7 @@ package js.jquery;
 	/**
 		Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
 	**/
-	public function then(doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise;
+	@:overload(function(doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise { })
+	@:overload(function(doneCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, ?progressCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Promise { })
+	public function then(doneCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Promise;
 }

+ 50 - 1
std/js/jquery/JQuery.hx

@@ -26,6 +26,16 @@ package js.jquery;
 		Creates an object that handles the actual transmission of Ajax data.
 	**/
 	static public function ajaxTransport(dataType:String, handler:Dynamic -> Dynamic -> js.jquery.JqXHR -> Void):Void;
+	/**
+		States if the current page, in the user's browser, is being rendered using the <a href="http://www.w3.org/TR/REC-CSS2/box.html">W3C CSS Box Model</a>. <strong>This property was removed in jQuery 1.8</strong>. Please try to use feature detection instead.
+	**/
+	@:deprecated("Deprecated since jQuery 1.3")
+	static public var boxModel : Bool;
+	/**
+		Contains flags for the useragent, read from navigator.userAgent. <strong>This property was removed in jQuery 1.9</strong> and is available only through the jQuery.migrate plugin. Please try to use feature detection instead.
+	**/
+	@:deprecated("Deprecated since jQuery 1.3")
+	static public var browser : Dynamic;
 	/**
 		Check to see if a DOM element is a descendant of another DOM element.
 	**/
@@ -59,6 +69,10 @@ package js.jquery;
 		Takes a string and throws an exception containing it.
 	**/
 	static public function error(message:String):Void;
+	/**
+		Escapes any character that has a special meaning in a CSS selector.
+	**/
+	static public function escapeSelector(selector:String):String;
 	/**
 		Merge the contents of two or more objects together into the first object.
 	**/
@@ -177,6 +191,7 @@ package js.jquery;
 	/**
 		Takes a well-formed JSON string and returns the resulting JavaScript value.
 	**/
+	@:deprecated("Deprecated since jQuery 3.0")
 	static public function parseJSON(json:String):Dynamic;
 	/**
 		Parses a string into an XML document.
@@ -212,9 +227,15 @@ package js.jquery;
 	@:overload(function(?duration:haxe.extern.EitherType<Float, String>, ?settings:Dynamic):Dynamic { })
 	@:overload(function(?duration:haxe.extern.EitherType<Float, String>, ?easing:String, ?complete:haxe.Constraints.Function):Dynamic { })
 	static public function speed(settings:Dynamic):Dynamic;
+	/**
+		Creates a new copy of jQuery whose properties and methods can be modified without affecting the original jQuery object.
+	**/
+	@:deprecated("Deprecated since jQuery 1.7")
+	static public function sub():js.jquery.JQuery;
 	/**
 		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>.
 	**/
+	@:deprecated("Deprecated since jQuery 1.9")
 	static public var support : Dynamic;
 	/**
 		Remove the whitespace from the beginning and end of a string.
@@ -227,6 +248,7 @@ package js.jquery;
 	/**
 		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.
 	**/
+	@:deprecated("Deprecated since jQuery 3.0")
 	static public function unique(array:Array<js.html.Element>):Array<js.html.Element>;
 	/**
 		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.
@@ -286,6 +308,7 @@ package js.jquery;
 	/**
 		Add the previous set of elements on the stack to the current set.
 	**/
+	@:deprecated("Deprecated since jQuery 1.8")
 	public function andSelf():js.jquery.JQuery;
 	/**
 		Perform a custom animation of a set of CSS properties.
@@ -355,10 +378,13 @@ package js.jquery;
 	public function clone(?withDataAndEvents:Bool):js.jquery.JQuery;
 	/**
 		For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
+		OR
+		Get an array of all the elements and selectors matched against the current element up through the DOM tree.
 	**/
 	@:overload(function(selection:js.jquery.JQuery):js.jquery.JQuery { })
 	@:overload(function(element:js.html.Element):js.jquery.JQuery { })
 	@:overload(function(selector:String, ?context:js.html.Element):js.jquery.JQuery { })
+	@:overload(function(selectors:haxe.extern.EitherType<Array<String>, haxe.extern.EitherType<String, js.jquery.JQuery>>, ?context:js.html.Element):Array<Dynamic> { })
 	public function closest(selector:String):js.jquery.JQuery;
 	/**
 		Get the children of each element in the set of matched elements, including text and comment nodes.
@@ -367,6 +393,7 @@ package js.jquery;
 	/**
 		The DOM node context originally passed to <code>jQuery()</code>; if none was passed then context will likely be the document.
 	**/
+	@:deprecated("Deprecated since jQuery 1.10")
 	public var context : js.html.Element;
 	/**
 		Bind an event handler to the "contextmenu" JavaScript event, or trigger that event on an element.
@@ -417,6 +444,13 @@ package js.jquery;
 		Remove the set of matched elements from the DOM.
 	**/
 	public function detach(?selector:String):js.jquery.JQuery;
+	/**
+		Remove event handlers previously attached using <code>.live()</code> from the elements.
+	**/
+	@:deprecated("Deprecated since jQuery 1.7")
+	@:overload(function(events:Dynamic):js.jquery.JQuery { })
+	@:overload(function(eventType:String, ?handler:String):js.jquery.JQuery { })
+	public function die():js.jquery.JQuery;
 	/**
 		Iterate over a jQuery object, executing a function for each matched element.
 	**/
@@ -437,6 +471,7 @@ package js.jquery;
 	/**
 		Bind an event handler to the "error" JavaScript event.
 	**/
+	@:deprecated("Deprecated since jQuery 1.8")
 	@:overload(function(?eventData:Dynamic, handler:js.jquery.Event -> Void):js.jquery.JQuery { })
 	public function error(handler:js.jquery.Event -> Void):js.jquery.JQuery;
 	/**
@@ -612,6 +647,13 @@ package js.jquery;
 		The number of elements in the jQuery object.
 	**/
 	public var length(default, null) : Int;
+	/**
+		Attach an event handler for all elements which match the current selector, now and in the future.
+	**/
+	@:deprecated("Deprecated since jQuery 1.7")
+	@:overload(function(events:String, handler:js.jquery.Event -> Void):js.jquery.JQuery { })
+	@:overload(function(events:String, ?data:Dynamic, handler:js.jquery.Event -> Void):js.jquery.JQuery { })
+	public function live(events:Dynamic):js.jquery.JQuery;
 	/**
 		Bind an event handler to the "load" JavaScript event.
 		OR
@@ -883,6 +925,7 @@ package js.jquery;
 	/**
 		A selector representing selector passed to jQuery(), if any, when creating the original set.
 	**/
+	@:deprecated("Deprecated since jQuery 1.7")
 	public var selector : String;
 	/**
 		Encode a set of form elements as a string for submission.
@@ -906,6 +949,7 @@ package js.jquery;
 	/**
 		Return the number of elements in the jQuery object.
 	**/
+	@:deprecated("Deprecated since jQuery 1.8")
 	public function size():Int;
 	/**
 		Reduce the set of matched elements to a subset specified by a range of indices.
@@ -953,11 +997,14 @@ package js.jquery;
 	**/
 	public function toArray():Array<js.html.Element>;
 	/**
+		Bind two or more handlers to the matched elements, to be executed on alternate clicks.
+		OR
 		Display or hide the matched elements.
 	**/
 	@:overload(function(options:Dynamic):js.jquery.JQuery { })
 	@:overload(function(?duration:haxe.extern.EitherType<Float, String>, ?complete:haxe.Constraints.Function):js.jquery.JQuery { })
 	@:overload(function(duration:haxe.extern.EitherType<Float, String>, ?easing:String, ?complete:haxe.Constraints.Function):js.jquery.JQuery { })
+	@:overload(function(handler:js.jquery.Event -> Void, handler:js.jquery.Event -> Void, ?handler:js.jquery.Event -> Void):js.jquery.JQuery { })
 	public function toggle(display:Bool):js.jquery.JQuery;
 	/**
 		Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument.
@@ -994,11 +1041,13 @@ package js.jquery;
 	/**
 		Bind an event handler to the "unload" JavaScript event.
 	**/
+	@:deprecated("Deprecated since jQuery 1.8")
 	@:overload(function(?eventData:Dynamic, handler:js.jquery.Event -> Void):js.jquery.JQuery { })
 	public function unload(handler:js.jquery.Event -> Void):js.jquery.JQuery;
 	/**
 		Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
 	**/
+	@:overload(function(?selector:String):js.jquery.JQuery { })
 	public function unwrap():js.jquery.JQuery;
 	/**
 		Set the value of each element in the set of matched elements.
@@ -1024,7 +1073,7 @@ package js.jquery;
 	/**
 		Wrap an HTML structure around all elements in the set of matched elements.
 	**/
-	@:overload(function(_function:Int -> haxe.extern.EitherType<String, js.jquery.JQuery>):js.jquery.JQuery { })
+	@:overload(function(_function:Void -> haxe.extern.EitherType<String, js.jquery.JQuery>):js.jquery.JQuery { })
 	public function wrapAll(wrappingElement:haxe.extern.EitherType<js.html.Element, haxe.extern.EitherType<String, js.jquery.JQuery>>):js.jquery.JQuery;
 	/**
 		Wrap an HTML structure around the content of each element in the set of matched elements.

+ 14 - 1
std/js/jquery/JqXHR.hx

@@ -13,9 +13,20 @@ package js.jquery;
 		Add handlers to be called when the Deferred object is rejected.
 	**/
 	public function fail(failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, ?failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Deferred;
+	/**
+		Determine whether a Deferred object has been rejected.
+	**/
+	@:deprecated("Deprecated since jQuery 1.7")
+	public function isRejected():Bool;
+	/**
+		Determine whether a Deferred object has been resolved.
+	**/
+	@:deprecated("Deprecated since jQuery 1.7")
+	public function isResolved():Bool;
 	/**
 		Utility method to filter and/or chain Deferreds.
 	**/
+	@:deprecated("Deprecated since jQuery 1.8")
 	@:overload(function(?doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise { })
 	public function pipe(?doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function):js.jquery.Promise;
 	/**
@@ -29,5 +40,7 @@ package js.jquery;
 	/**
 		Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
 	**/
-	public function then(doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise;
+	@:overload(function(doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise { })
+	@:overload(function(doneCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, ?progressCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Promise { })
+	public function then(doneCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Promise;
 }

+ 14 - 1
std/js/jquery/Promise.hx

@@ -13,9 +13,20 @@ package js.jquery;
 		Add handlers to be called when the Deferred object is rejected.
 	**/
 	public function fail(failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, ?failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Deferred;
+	/**
+		Determine whether a Deferred object has been rejected.
+	**/
+	@:deprecated("Deprecated since jQuery 1.7")
+	public function isRejected():Bool;
+	/**
+		Determine whether a Deferred object has been resolved.
+	**/
+	@:deprecated("Deprecated since jQuery 1.7")
+	public function isResolved():Bool;
 	/**
 		Utility method to filter and/or chain Deferreds.
 	**/
+	@:deprecated("Deprecated since jQuery 1.8")
 	@:overload(function(?doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise { })
 	public function pipe(?doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function):js.jquery.Promise;
 	/**
@@ -29,5 +40,7 @@ package js.jquery;
 	/**
 		Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
 	**/
-	public function then(doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise;
+	@:overload(function(doneFilter:haxe.Constraints.Function, ?failFilter:haxe.Constraints.Function, ?progressFilter:haxe.Constraints.Function):js.jquery.Promise { })
+	@:overload(function(doneCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, ?progressCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Promise { })
+	public function then(doneCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>, failCallbacks:haxe.extern.EitherType<haxe.Constraints.Function, Array<haxe.Constraints.Function>>):js.jquery.Promise;
 }