Ver código fonte

Sync with Browser.hx 4fff300f.

Bruno Garcia 12 anos atrás
pai
commit
8498e740d2

+ 1 - 1
std/js/html/CSSStyleDeclaration.hx

@@ -626,6 +626,6 @@ Negative value are also allowed. */
 
 	function removeProperty( propertyName : String ) : String;
 
-	function setProperty( propertyName : String, value : String, priority : String ) : Void;
+	function setProperty( propertyName : String, ?value : String, priority : String ) : Void;
 
 }

+ 1 - 1
std/js/html/CanvasElement.hx

@@ -43,7 +43,7 @@ extern class CanvasElement extends Element
 
 	function getContext( contextId : String ) : Dynamic;
 
-	function toDataURL( type : String ) : String;
+	function toDataURL( ?type : String ) : String;
 
 	/** A typed shortcut for <code>getContext("2d")</code>. */
 	public inline function getContext2d() : CanvasRenderingContext2D { return cast getContext("2d"); }

+ 3 - 3
std/js/html/DOMImplementation.hx

@@ -30,12 +30,12 @@ extern class DOMImplementation
 {
 	function createCSSStyleSheet( title : String, media : String ) : CSSStyleSheet;
 
-	function createDocument( namespaceURI : String, qualifiedName : String, doctype : DocumentType ) : Document;
+	function createDocument( ?namespaceURI : String, ?qualifiedName : String, ?doctype : DocumentType ) : Document;
 
-	function createDocumentType( qualifiedName : String, publicId : String, systemId : String ) : DocumentType;
+	function createDocumentType( ?qualifiedName : String, ?publicId : String, ?systemId : String ) : DocumentType;
 
 	function createHTMLDocument( title : String ) : Document;
 
-	function hasFeature( feature : String, version : String ) : Bool;
+	function hasFeature( feature : String, ?version : String ) : Bool;
 
 }

+ 4 - 4
std/js/html/DOMWindow.hx

@@ -361,11 +361,11 @@ extern class DOMWindow extends EventTarget
 
 	function alert( message : String ) : Void;
 
-	function atob( string : String ) : String;
+	function atob( ?string : String ) : String;
 
 	function blur() : Void;
 
-	function btoa( string : String ) : String;
+	function btoa( ?string : String ) : String;
 
 	@:overload( function( id : Int ) :Void {} )
 	function cancelAnimationFrame( id : Int ) : Void;
@@ -390,9 +390,9 @@ extern class DOMWindow extends EventTarget
 
 	function focus() : Void;
 
-	function getComputedStyle( element : Element, pseudoElement : String ) : CSSStyleDeclaration;
+	function getComputedStyle( element : Element, ?pseudoElement : String ) : CSSStyleDeclaration;
 
-	function getMatchedCSSRules( element : Element, pseudoElement : String ) : CSSRuleList;
+	function getMatchedCSSRules( element : Element, ?pseudoElement : String ) : CSSRuleList;
 
 	function getSelection() : DOMSelection;
 

+ 5 - 5
std/js/html/Document.hx

@@ -308,7 +308,7 @@ extern class Document extends Node
 
 	function createAttribute( name : String ) : Attr;
 
-	function createAttributeNS( namespaceURI : String, qualifiedName : String ) : Attr;
+	function createAttributeNS( ?namespaceURI : String, ?qualifiedName : String ) : Attr;
 
 	function createCDATASection( data : String ) : CDATASection;
 
@@ -316,9 +316,9 @@ extern class Document extends Node
 
 	function createDocumentFragment() : DocumentFragment;
 
-	function createElement( tagName : String ) : Element;
+	function createElement( ?tagName : String ) : Element;
 
-	function createElementNS( namespaceURI : String, qualifiedName : String ) : Element;
+	function createElementNS( ?namespaceURI : String, ?qualifiedName : String ) : Element;
 
 	function createEntityReference( name : String ) : EntityReference;
 
@@ -346,7 +346,7 @@ extern class Document extends Node
 
 	function evaluate( expression : String, contextNode : Node, resolver : XPathNSResolver, type : Int, inResult : XPathResult ) : XPathResult;
 
-	function execCommand( command : String, userInterface : Bool, value : String ) : Bool;
+	function execCommand( command : String, userInterface : Bool, ?value : String ) : Bool;
 
 	function exitFullscreen() : Void;
 
@@ -362,7 +362,7 @@ extern class Document extends Node
 
 	function getElementsByTagName( tagname : String ) : NodeList;
 
-	function getElementsByTagNameNS( namespaceURI : String, localName : String ) : NodeList;
+	function getElementsByTagNameNS( ?namespaceURI : String, localName : String ) : NodeList;
 
 	function getOverrideStyle( element : Element, pseudoElement : String ) : CSSStyleDeclaration;
 

+ 5 - 5
std/js/html/Element.hx

@@ -326,11 +326,11 @@ extern class Element extends Node
 
 	function getAttribute( name : String ) : String;
 
-	function getAttributeNS( namespaceURI : String, localName : String ) : String;
+	function getAttributeNS( ?namespaceURI : String, localName : String ) : String;
 
 	function getAttributeNode( name : String ) : Attr;
 
-	function getAttributeNodeNS( namespaceURI : String, localName : String ) : Attr;
+	function getAttributeNodeNS( ?namespaceURI : String, localName : String ) : Attr;
 
 	function getBoundingClientRect() : ClientRect;
 
@@ -340,11 +340,11 @@ extern class Element extends Node
 
 	function getElementsByTagName( name : String ) : NodeList;
 
-	function getElementsByTagNameNS( namespaceURI : String, localName : String ) : NodeList;
+	function getElementsByTagNameNS( ?namespaceURI : String, localName : String ) : NodeList;
 
 	function hasAttribute( name : String ) : Bool;
 
-	function hasAttributeNS( namespaceURI : String, localName : String ) : Bool;
+	function hasAttributeNS( ?namespaceURI : String, localName : String ) : Bool;
 
 	function insertAdjacentElement( where : String, element : Element ) : Element;
 
@@ -382,7 +382,7 @@ extern class Element extends Node
 
 	function setAttribute( name : String, value : String ) : Void;
 
-	function setAttributeNS( namespaceURI : String, qualifiedName : String, value : String ) : Void;
+	function setAttributeNS( ?namespaceURI : String, qualifiedName : String, value : String ) : Void;
 
 	function setAttributeNode( newAttr : Attr ) : Attr;
 

+ 1 - 1
std/js/html/EventListener.hx

@@ -23,4 +23,4 @@
 // This file is generated, do not edit!
 package js.html;
 
-typedef EventListener = Event -> Void;
+typedef EventListener = Dynamic -> Void;

+ 1 - 1
std/js/html/MediaElement.hx

@@ -170,7 +170,7 @@ extern class MediaElement extends Element
 
 	function addTextTrack( kind : String, ?label : String, ?language : String ) : TextTrack;
 
-	function canPlayType( type : String, keySystem : String ) : String;
+	function canPlayType( type : String, ?keySystem : String ) : String;
 
 	function cancelKeyRequest( keySystem : String, sessionId : String ) : Void;
 

+ 2 - 2
std/js/html/NamedNodeMap.hx

@@ -32,13 +32,13 @@ extern class NamedNodeMap implements ArrayAccess<Node>
 
 	function getNamedItem( name : String ) : Node;
 
-	function getNamedItemNS( namespaceURI : String, localName : String ) : Node;
+	function getNamedItemNS( ?namespaceURI : String, localName : String ) : Node;
 
 	function item( index : Int ) : Node;
 
 	function removeNamedItem( name : String ) : Node;
 
-	function removeNamedItemNS( namespaceURI : String, localName : String ) : Node;
+	function removeNamedItemNS( ?namespaceURI : String, localName : String ) : Node;
 
 	function setNamedItem( node : Node ) : Node;
 

+ 4 - 4
std/js/html/Node.hx

@@ -127,17 +127,17 @@ extern class Node extends EventTarget
 
 	function insertBefore( newChild : Node, refChild : Node ) : Node;
 
-	function isDefaultNamespace( namespaceURI : String ) : Bool;
+	function isDefaultNamespace( ?namespaceURI : String ) : Bool;
 
 	function isEqualNode( other : Node ) : Bool;
 
 	function isSameNode( other : Node ) : Bool;
 
-	function isSupported( feature : String, version : String ) : Bool;
+	function isSupported( feature : String, ?version : String ) : Bool;
 
-	function lookupNamespaceURI( prefix : String ) : String;
+	function lookupNamespaceURI( ?prefix : String ) : String;
 
-	function lookupPrefix( namespaceURI : String ) : String;
+	function lookupPrefix( ?namespaceURI : String ) : String;
 
 	function normalize() : Void;
 

+ 1 - 1
std/js/html/ShadowRoot.hx

@@ -43,7 +43,7 @@ extern class ShadowRoot extends DocumentFragment
 
 	function getElementsByTagName( tagName : String ) : NodeList;
 
-	function getElementsByTagNameNS( namespaceURI : String, localName : String ) : NodeList;
+	function getElementsByTagNameNS( ?namespaceURI : String, localName : String ) : NodeList;
 
 	function getSelection() : DOMSelection;
 

+ 1 - 1
std/js/html/StorageEvent.hx

@@ -63,6 +63,6 @@ extern class StorageEvent extends Event
 
 	function new(type : String, canBubble : Bool = true, cancelable : Bool = true) : Void;
 
-	function initStorageEvent( typeArg : String, canBubbleArg : Bool, cancelableArg : Bool, keyArg : String, oldValueArg : String, newValueArg : String, urlArg : String, storageAreaArg : Storage ) : Void;
+	function initStorageEvent( typeArg : String, canBubbleArg : Bool, cancelableArg : Bool, keyArg : String, ?oldValueArg : String, ?newValueArg : String, urlArg : String, storageAreaArg : Storage ) : Void;
 
 }

+ 22 - 10
std/js/html/webgl/RenderingContext.hx

@@ -740,11 +740,14 @@ extern class RenderingContext extends js.html.CanvasRenderingContext
 
 	function getActiveUniform( program : Program, index : Int ) : ActiveInfo;
 
-	function getAttachedShaders( program : Program ) : Void;
+	/** Throws DOMException. */
+	@:overload( function( program : Program ) :Void {} )
+	function getAttachedShaders( program : Program ) : Array<js.html.webgl.Shader>;
 
 	function getAttribLocation( program : Program, name : String ) : Int;
 
-	function getBufferParameter() : Void;
+	@:overload( function() :Void {} )
+	function getBufferParameter( target : Int, pname : Int ) : Dynamic;
 
 	function getContextAttributes() : ContextAttributes;
 
@@ -752,19 +755,25 @@ extern class RenderingContext extends js.html.CanvasRenderingContext
 
 	function getExtension( name : String ) : Dynamic;
 
-	function getFramebufferAttachmentParameter() : Void;
+	@:overload( function() :Void {} )
+	function getFramebufferAttachmentParameter( target : Int, attachment : Int, pname : Int ) : Dynamic;
 
-	function getParameter() : Void;
+	@:overload( function() :Void {} )
+	function getParameter( pname : Int ) : Dynamic;
 
 	function getProgramInfoLog( program : Program ) : String;
 
-	function getProgramParameter() : Void;
+	@:overload( function() :Void {} )
+	function getProgramParameter( program : Program, pname : Int ) : Dynamic;
 
-	function getRenderbufferParameter() : Void;
+	@:overload( function() :Void {} )
+	function getRenderbufferParameter( target : Int, pname : Int ) : Dynamic;
 
 	function getShaderInfoLog( shader : Shader ) : String;
 
-	function getShaderParameter() : Void;
+	/** Throws DOMException. */
+	@:overload( function() :Void {} )
+	function getShaderParameter( shader : Shader, pname : Int ) : Dynamic;
 
 	function getShaderPrecisionFormat( shadertype : Int, precisiontype : Int ) : ShaderPrecisionFormat;
 
@@ -772,13 +781,16 @@ extern class RenderingContext extends js.html.CanvasRenderingContext
 
 	function getSupportedExtensions() : Array<String>;
 
-	function getTexParameter() : Void;
+	@:overload( function() :Void {} )
+	function getTexParameter( target : Int, pname : Int ) : Dynamic;
 
-	function getUniform() : Void;
+	@:overload( function() :Void {} )
+	function getUniform( program : Program, location : UniformLocation ) : Dynamic;
 
 	function getUniformLocation( program : Program, name : String ) : UniformLocation;
 
-	function getVertexAttrib() : Void;
+	@:overload( function() :Void {} )
+	function getVertexAttrib( index : Int, pname : Int ) : Dynamic;
 
 	function getVertexAttribOffset( index : Int, pname : Int ) : Int;