Files
kiss-flixel/feedback-server/externs/js/html/INode.hx

173 lines
5.7 KiB
Haxe

package js.html;
/**
Node is an interface from which a number of DOM API object types inherit. It allows those types to be treated similarly; for example, inheriting the same set of methods, or being tested in the same way.
**/
typedef INode = {
/**
Returns node's node document's document base URL.
**/
final baseURI : String;
/**
Returns the children.
**/
final childNodes : NodeListOf<ChildNode>;
/**
Returns the first child.
**/
final firstChild : Null<ChildNode>;
/**
Returns true if node is connected and false otherwise.
**/
final isConnected : Bool;
/**
Returns the last child.
**/
final lastChild : Null<ChildNode>;
final namespaceURI : Null<String>;
/**
Returns the next sibling.
**/
final nextSibling : Null<ChildNode>;
/**
Returns a string appropriate for the type of node.
**/
final nodeName : String;
/**
Returns the type of node.
**/
final nodeType : Float;
var nodeValue : Null<String>;
/**
Returns the node document. Returns null for documents.
**/
final ownerDocument : Null<js.html.Document>;
/**
Returns the parent element.
**/
final parentElement : Null<js.html.Element>;
/**
Returns the parent.
**/
final parentNode : Null<js.html.Node>;
/**
Returns the previous sibling.
**/
final previousSibling : Null<js.html.Node>;
var textContent : Null<String>;
function appendChild<T>(newChild:T):T;
/**
Returns a copy of node. If deep is true, the copy also includes the node's descendants.
**/
function cloneNode(?deep:Bool):js.html.Node;
/**
Returns a bitmask indicating the position of other relative to node.
**/
function compareDocumentPosition(other:js.html.Node):Float;
/**
Returns true if other is an inclusive descendant of node, and false otherwise.
**/
function contains(other:Null<js.html.Node>):Bool;
/**
Returns node's root.
**/
function getRootNode(?options:js.html.GetRootNodeOptions):js.html.Node;
/**
Returns whether node has children.
**/
function hasChildNodes():Bool;
function insertBefore<T>(newChild:T, refChild:Null<js.html.Node>):T;
function isDefaultNamespace(namespace:Null<String>):Bool;
/**
Returns whether node and otherNode have the same properties.
**/
function isEqualNode(otherNode:Null<js.html.Node>):Bool;
function isSameNode(otherNode:Null<js.html.Node>):Bool;
function lookupNamespaceURI(prefix:Null<String>):Null<String>;
function lookupPrefix(namespace:Null<String>):Null<String>;
/**
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
**/
function normalize():Void;
function removeChild<T>(oldChild:T):T;
function replaceChild<T>(newChild:js.html.Node, oldChild:T):T;
final ATTRIBUTE_NODE : Float;
/**
node is a CDATASection node.
**/
final CDATA_SECTION_NODE : Float;
/**
node is a Comment node.
**/
final COMMENT_NODE : Float;
/**
node is a DocumentFragment node.
**/
final DOCUMENT_FRAGMENT_NODE : Float;
/**
node is a document.
**/
final DOCUMENT_NODE : Float;
/**
Set when other is a descendant of node.
**/
final DOCUMENT_POSITION_CONTAINED_BY : Float;
/**
Set when other is an ancestor of node.
**/
final DOCUMENT_POSITION_CONTAINS : Float;
/**
Set when node and other are not in the same tree.
**/
final DOCUMENT_POSITION_DISCONNECTED : Float;
/**
Set when other is following node.
**/
final DOCUMENT_POSITION_FOLLOWING : Float;
final DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC : Float;
/**
Set when other is preceding node.
**/
final DOCUMENT_POSITION_PRECEDING : Float;
/**
node is a doctype.
**/
final DOCUMENT_TYPE_NODE : Float;
/**
node is an element.
**/
final ELEMENT_NODE : Float;
final ENTITY_NODE : Float;
final ENTITY_REFERENCE_NODE : Float;
final NOTATION_NODE : Float;
/**
node is a ProcessingInstruction node.
**/
final PROCESSING_INSTRUCTION_NODE : Float;
/**
node is a Text node.
**/
final TEXT_NODE : Float;
/**
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in §2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
**/
function addEventListener(type:String, listener:Null<EventListenerOrEventListenerObject>, ?options:ts.AnyOf2<Bool, js.html.AddEventListenerOptions>):Void;
/**
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
**/
function dispatchEvent(event:js.html.Event):Bool;
/**
Removes the event listener in target's event listener list with the same type, callback, and options.
**/
function removeEventListener(type:String, callback:Null<EventListenerOrEventListenerObject>, ?options:ts.AnyOf2<Bool, js.html.EventListenerOptions>):Void;
};