Sfoglia il codice sorgente

regenerated jQuery extern

with api.jquery.com v1.12.33
set jquery_ver define to 30301 (jQuery 3.3.1)
Andy Li 7 anni fa
parent
commit
b577011411
4 ha cambiato i file con 12 aggiunte e 9 eliminazioni
  1. 1 0
      extra/CHANGES.txt
  2. 1 1
      src/compiler/main.ml
  3. 1 1
      std/js/jquery/Callbacks.hx
  4. 9 7
      std/js/jquery/JQuery.hx

+ 1 - 0
extra/CHANGES.txt

@@ -5,6 +5,7 @@ XXXX-XX-XX:
 	php : Optimized haxe.ds.Vector (VectorData is not Array anymore)
 	php : Optimized `Map.copy()` and `Array.copy()`
 	php : Support native PHP generators. See `php.Syntax.yield()` and `php.Generator`
+	js : Updated jQuery extern (js.jquery.*). Supporting jQuery up to 3.3.1.
 
 	Bugfixes:
 

+ 1 - 1
src/compiler/main.ml

@@ -213,7 +213,7 @@ module Initialize = struct
 				"n"
 			| Js ->
 				if not (PMap.exists (fst (Define.infos Define.JqueryVer)) com.defines.Define.values) then
-					Common.define_value com Define.JqueryVer "11204";
+					Common.define_value com Define.JqueryVer "30301";
 
 				let es_version =
 					try

+ 1 - 1
std/js/jquery/Callbacks.hx

@@ -24,7 +24,7 @@ package js.jquery;
 	/**
 		Call all callbacks in a list with the given context and arguments.
 	**/
-	public function fireWith(?context:Dynamic, ?args:Dynamic):js.jquery.Callbacks;
+	public function fireWith(?context:Dynamic, ?args:haxe.extern.EitherType<Array<Dynamic>, js.html.NodeList>):js.jquery.Callbacks;
 	/**
 		Determine if the callbacks have already been called at least once.
 	**/

+ 9 - 7
std/js/jquery/JQuery.hx

@@ -21,13 +21,13 @@ package js.jquery;
 	/**
 		Set default values for future Ajax requests. Its use is not recommended.
 	**/
-	static public function ajaxSetup(options:Dynamic):Void;
+	static public function ajaxSetup(options:Dynamic):Dynamic;
 	/**
 		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.
+		States if the current page, in the user's browser, is being rendered using the <a href="https://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;
@@ -64,7 +64,7 @@ package js.jquery;
 		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.
 	**/
 	@:overload(function(object:Dynamic, callback:String -> Dynamic -> Void):Dynamic { })
-	static public function each(array:Array<Dynamic>, callback:Int -> Dynamic -> Void):Dynamic;
+	static public function each(array:haxe.extern.EitherType<Array<Dynamic>, js.html.NodeList>, callback:Int -> Dynamic -> Void):Dynamic;
 	/**
 		Takes a string and throws an exception containing it.
 	**/
@@ -106,7 +106,7 @@ package js.jquery;
 	/**
 		Execute some JavaScript code globally.
 	**/
-	static public function globalEval(code:String):Void;
+	static public function globalEval(code:String):Dynamic;
 	/**
 		Finds the elements of an array which satisfy a filter function. The original array is not affected.
 	**/
@@ -136,9 +136,10 @@ package js.jquery;
 	**/
 	static public function isEmptyObject(object:Dynamic):Bool;
 	/**
-		Determine if the argument passed is a JavaScript function object.
+		Determines if its argument is callable as a function.
 	**/
-	static public function isFunction(obj:Dynamic):Bool;
+	@:deprecated("Deprecated since jQuery 3.3")
+	static public function isFunction(value:Dynamic):Bool;
 	/**
 		Determines whether its argument represents a JavaScript number.
 	**/
@@ -150,6 +151,7 @@ package js.jquery;
 	/**
 		Determine whether the argument is a window.
 	**/
+	@:deprecated("Deprecated since jQuery 3.3")
 	static public function isWindow(obj:Dynamic):Bool;
 	/**
 		Check to see if a DOM node is within an XML document (or is an XML document).
@@ -242,7 +244,7 @@ package js.jquery;
 	@: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>.
+		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="https://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;