Compartir a través de


Document interface

Cualquier página web cargada en el explorador y actúa como punto de entrada en el contenido de la página web, que es el árbol DOM.

Extends

Node,DocumentAndElementEventHandlers,DocumentOrShadowRoot,FontFaceSource,GlobalEventHandlers,NonElementParentNode,ParentNode,XPathEvaluatorBase

Propiedades

alinkColor

Establece u obtiene el color de todos los vínculos activos del documento.

all

Devuelve una referencia a la colección de elementos contenidos por el objeto .

anchors

Recupera una colección de todos los objetos que tienen una propiedad name o id. Los objetos de esta colección están en orden de origen HTML.

applets

Recupera una colección de todos los objetos applet del documento.

bgColor

Obsolescente. Establece o recupera un valor que indica el color de fondo detrás del objeto.

body

Especifica el principio y el final del cuerpo del documento.

characterSet

Devuelve la codificación del documento.

charset

Obtiene o establece el juego de caracteres usado para codificar el objeto.

compatMode

Obtiene un valor que indica si el modo compatible con estándares está activado para el objeto .

contentType

Devuelve el tipo de contenido del documento.

cookie

Devuelve las cookies HTTP que se aplican al documento. Si no hay cookies o cookies no se pueden aplicar a este recurso, se devolverá la cadena vacía.

Se puede establecer para agregar una nueva cookie al conjunto de cookies HTTP del elemento.

Si el contenido se encuentra en un origen único (por ejemplo, en un iframe con el atributo sandbox), se iniciará una excepción DOMException "SecurityError" al obtener y establecer.

currentScript

Devuelve el elemento script o el elemento de script SVG, que se está ejecutando actualmente, siempre y cuando el elemento represente un script clásico. En el caso de la ejecución de script reentrant, devuelve el que más recientemente comenzó a ejecutarse entre los que aún no han terminado de ejecutarse.

Devuelve null si el documento no está ejecutando actualmente un script o un elemento de script SVG (por ejemplo, porque el script en ejecución es un controlador de eventos o un tiempo de espera), o si el script que se está ejecutando actualmente o el elemento de script SVG representa un script de módulo.

defaultView

Devuelve el objeto Window del documento activo.

designMode

Establece u obtiene un valor que indica si se puede editar el documento.

dir

Establece o recupera un valor que indica el orden de lectura del objeto.

doctype

Obtiene un objeto que representa la declaración de tipo de documento asociada al documento actual.

documentElement

Obtiene una referencia al nodo raíz del documento.

documentURI

Devuelve la dirección URL del documento.

domain

Establece u obtiene el dominio de seguridad del documento.

embeds

Recupera una colección de todos los objetos insertados del documento.

fgColor

Establece u obtiene el color de primer plano (texto) del documento.

forms

Recupera una colección, en orden de origen, de todos los objetos de formulario del documento.

fullscreen
fullscreenEnabled

Devuelve true si el documento tiene la capacidad de mostrar elementos de pantalla completa y se admite la pantalla completa o false en caso contrario.

head

Devuelve el elemento head.

hidden
images

Recupera una colección, en orden de origen, de objetos img en el documento.

implementation

Obtiene el objeto de implementación del documento actual.

inputEncoding

Devuelve la codificación de caracteres usada para crear la página web que se carga en el objeto de documento.

lastModified

Obtiene la fecha en que se modificó por última vez la página, si la página proporciona una.

linkColor

Establece u obtiene el color de los vínculos del documento.

links

Recupera una colección de todos los objetos que especifican la propiedad href y todos los objetos de área del documento.

location

Contiene información sobre la dirección URL actual.

mozCancelFullScreen
msExitFullscreen
onfullscreenchange
onfullscreenerror
onpointerlockchange
onpointerlockerror
onreadystatechange

Se desencadena cuando el estado del objeto ha cambiado.

onvisibilitychange
ownerDocument
pictureInPictureEnabled
plugins

Devuelve una htmlCollection de los elementos para insertar en el documento.

readyState

Recupera un valor que indica el estado actual del objeto.

referrer

Obtiene la dirección URL de la ubicación que hizo referencia al usuario a la página actual.

rootElement
scripts

Recupera una colección de todos los objetos de script del documento.

scrollingElement
timeline
title

Contiene el título del documento.

URL

Establece u obtiene la dirección URL del documento actual.

visibilityState
vlinkColor

Establece u obtiene el color de los vínculos que el usuario ha visitado.

webkitExitFullscreen

Propiedades heredadas

activeElement

Devuelve el elemento más profundo del documento a través del cual o a qué eventos clave se enrutan. Esto es, aproximadamente hablando, el elemento centrado en el documento.

Para los fines de esta API, cuando se centra un contexto de exploración secundario, su contenedor se centra en el contexto de exploración primario. Por ejemplo, si el usuario mueve el foco a un control de texto en un iframe, el iframe es el elemento devuelto por la API activeElement en el documento de nodo del iframe.

Del mismo modo, cuando el elemento centrado está en un árbol de nodos diferente al documentOrShadowRoot, el elemento devuelto será el host que se encuentra en el mismo árbol de nodos que documentOrShadowRoot si documentOrShadowRoot es un antecesor inclusivo incluido incluido del elemento centrado y null si no.

adoptedStyleSheets
ATTRIBUTE_NODE
baseURI

Devuelve la dirección URL base del documento del nodo del nodo.

CDATA_SECTION_NODE

node es un nodo CDATASection.

childElementCount
childNodes

Devuelve los elementos secundarios.

children

Devuelve los elementos secundarios.

COMMENT_NODE

node es un nodo Comment.

DOCUMENT_FRAGMENT_NODE

node es un nodo DocumentFragment.

DOCUMENT_NODE

node es un documento.

DOCUMENT_POSITION_CONTAINED_BY

Se establece cuando otro es un descendiente del nodo.

DOCUMENT_POSITION_CONTAINS

Se establece cuando otro es un antecesor de nodo.

DOCUMENT_POSITION_DISCONNECTED

Se establece cuando el nodo y otros no están en el mismo árbol.

DOCUMENT_POSITION_FOLLOWING

Se establece cuando otro nodo sigue.

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
DOCUMENT_POSITION_PRECEDING

Se establece cuando otro nodo es anterior.

DOCUMENT_TYPE_NODE

node es un tipo de documento.

ELEMENT_NODE

node es un elemento .

ENTITY_NODE
ENTITY_REFERENCE_NODE
firstChild

Devuelve el primer elemento secundario.

firstElementChild

Devuelve el primer elemento secundario que es un elemento y null en caso contrario.

fonts
fullscreenElement

Devuelve el elemento de pantalla completa del documento.

isConnected

Devuelve true si el nodo está conectado y false en caso contrario.

lastChild

Devuelve el último elemento secundario.

lastElementChild

Devuelve el último elemento secundario que es un elemento y null en caso contrario.

nextSibling

Devuelve el siguiente elemento del mismo nivel.

nodeName

Devuelve una cadena adecuada para el tipo de nodo.

nodeType

Devuelve el tipo de nodo.

nodeValue
NOTATION_NODE
onabort

Se desencadena cuando el usuario anula la descarga.

onanimationcancel
onanimationend
onanimationiteration
onanimationstart
onauxclick
onbeforeinput
onblur

Se desencadena cuando el objeto pierde el foco de entrada.

oncancel
oncanplay

Se produce cuando la reproducción es posible, pero requeriría un mayor almacenamiento en búfer.

oncanplaythrough
onchange

Se desencadena cuando el contenido del objeto o la selección han cambiado.

onclick

Se desencadena cuando el usuario hace clic en el botón izquierdo del mouse en el objeto

onclose
oncontextmenu

Se desencadena cuando el usuario hace clic en el botón derecho del mouse en el área cliente, abriendo el menú contextual.

oncopy
oncuechange
oncut
ondblclick

Se desencadena cuando el usuario hace doble clic en el objeto.

ondrag

Se activa en el objeto de origen continuamente durante una operación de arrastre.

ondragend

Se activa en el objeto de origen cuando el usuario suelta el mouse al cerrar una operación de arrastre.

ondragenter

Se activa en el elemento de destino cuando el usuario arrastra el objeto a un destino de colocación válido.

ondragleave

Se activa en el objeto de destino cuando el usuario mueve el mouse fuera de un destino de colocación válido durante una operación de arrastre.

ondragover

Se activa en el elemento de destino continuamente mientras el usuario arrastra el objeto sobre un destino de colocación válido.

ondragstart

Se activa en el objeto de origen cuando el usuario empieza a arrastrar una selección de texto o un objeto seleccionado.

ondrop
ondurationchange

Se produce cuando se actualiza el atributo duration.

onemptied

Se produce cuando el elemento multimedia se restablece a su estado inicial.

onended

Se produce cuando se alcanza el final de la reproducción.

onerror

Se desencadena cuando se produce un error durante la carga de objetos.

onfocus

Se desencadena cuando el objeto recibe el foco.

onformdata
ongotpointercapture
oninput
oninvalid
onkeydown

Se activa cuando el usuario presiona una tecla.

onkeypress

Se activa cuando el usuario presiona una tecla alfanumérica.

onkeyup

Se desencadena cuando el usuario libera una clave.

onload

Se desencadena inmediatamente después de que el explorador cargue el objeto.

onloadeddata

Se produce cuando los datos multimedia se cargan en la posición de reproducción actual.

onloadedmetadata

Se produce cuando se han determinado la duración y las dimensiones del medio.

onloadstart

Se produce cuando Internet Explorer comienza a buscar datos multimedia.

onlostpointercapture
onmousedown

Se desencadena cuando el usuario hace clic en el objeto con cualquiera de los botones del mouse.

onmouseenter
onmouseleave
onmousemove

Se desencadena cuando el usuario mueve el mouse sobre el objeto.

onmouseout

Se desencadena cuando el usuario mueve el puntero del mouse fuera de los límites del objeto.

onmouseover

Se desencadena cuando el usuario mueve el puntero del mouse al objeto .

onmouseup

Se desencadena cuando el usuario suelta un botón del mouse mientras el mouse está sobre el objeto.

onpaste
onpause

Se produce cuando la reproducción está en pausa.

onplay

Se produce cuando se solicita el método play.

onplaying

Se produce cuando se ha iniciado la reproducción del audio o el vídeo.

onpointercancel
onpointerdown
onpointerenter
onpointerleave
onpointermove
onpointerout
onpointerover
onpointerup
onprogress

Se produce para indicar el progreso durante la descarga de datos multimedia.

onratechange

Se produce cuando la velocidad de reproducción aumenta o disminuye.

onreset

Se desencadena cuando el usuario restablece un formulario.

onresize
onscroll

Se activa cuando el usuario cambia la posición del cuadro de desplazamiento en la barra de desplazamiento del objeto.

onsecuritypolicyviolation
onseeked

Se produce cuando finaliza la operación de búsqueda.

onseeking

Se produce cuando se mueve la posición de reproducción actual.

onselect

Se activa cuando cambia la selección actual.

onselectionchange
onselectstart
onslotchange
onstalled

Se produce cuando la descarga se ha detenido.

onsubmit
onsuspend

Se produce si la operación de carga se ha detenido intencionadamente.

ontimeupdate

Se produce para indicar la posición de reproducción actual.

ontoggle
ontouchcancel
ontouchend
ontouchmove
ontouchstart
ontransitioncancel
ontransitionend
ontransitionrun
ontransitionstart
onvolumechange

Se produce cuando se cambia el volumen, o la reproducción se silencia o se desactiva.

onwaiting

Se produce cuando la reproducción se detiene porque el siguiente fotograma de un recurso de vídeo no está disponible.

onwebkitanimationend
onwebkitanimationiteration
onwebkitanimationstart
onwebkittransitionend
onwheel
parentElement

Devuelve el elemento primario.

parentNode

Devuelve el elemento primario.

pictureInPictureElement
pointerLockElement
previousSibling

Devuelve el elemento relacionado anterior.

PROCESSING_INSTRUCTION_NODE

node es un nodo ProcessingInstruction.

styleSheets

Recupera una colección de objetos styleSheet que representan las hojas de estilos que corresponden a cada instancia de un vínculo o objeto de estilo del documento.

textContent
TEXT_NODE

node es un nodo Text.

Métodos

addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)
addEventListener<K>(K, (this: Document, ev: DocumentEventMap[K]) => any, boolean | AddEventListenerOptions)
adoptNode<T>(T)

Mueve el nodo de otro documento y lo devuelve.

Si el nodo es un documento, inicia una excepción DOMException "NotSupportedError" o, si el nodo es una raíz de sombra, produce una excepción DOMException "HierarchyRequestError".

captureEvents()
caretRangeFromPoint(number, number)
clear()
close()

Cierra un flujo de salida y fuerza a que se muestren los datos enviados.

createAttribute(string)

Crea un objeto de atributo con un nombre especificado.

createAttributeNS(null | string, string)
createCDATASection(string)

Devuelve un nodo CDATASection cuyos datos son datos.

createComment(string)

Crea un objeto de comentario con los datos especificados.

createDocumentFragment()

Crea un nuevo documento.

createElement(string, ElementCreationOptions)
createElement<K>(K, ElementCreationOptions)

Crea una instancia del elemento para la etiqueta especificada.

createElement<K>(K, ElementCreationOptions)
createElementNS("http://www.w3.org/1999/xhtml", string)

Devuelve un elemento con espacio de nombres de espacio de nombres. Su prefijo de espacio de nombres será todo antes de ":" (U+003E) en qualifiedName o null. Su nombre local será todo después de ":" (U+003E) en qualifiedName o qualifiedName.

Si localName no coincide con name production, se producirá la excepción DOMException "InvalidCharacterError".

Si una de las condiciones siguientes es true, se producirá una excepción DOMException "NamespaceError":

localName no coincide con la producción de QName. El prefijo de espacio de nombres no es null y el espacio de nombres es la cadena vacía. El prefijo del espacio de nombres es "xml" y el espacio de nombres no es el espacio de nombres XML. el prefijo qualifiedName o namespace es "xmlns" y el espacio de nombres no es el espacio de nombres XMLNS. namespace es el espacio de nombres XMLNS y ni qualifiedName ni el prefijo del espacio de nombres son "xmlns".

Cuando se proporciona, las opciones se pueden usar para crear un elemento integrado personalizado.

createElementNS("http://www.w3.org/2000/svg", string)
createElementNS(null | string, string, ElementCreationOptions)
createElementNS(null | string, string, string | ElementCreationOptions)
createElementNS<K>("http://www.w3.org/2000/svg", K)
createEvent("AnimationEvent")
createEvent("AnimationPlaybackEvent")
createEvent("AudioProcessingEvent")
createEvent("BeforeUnloadEvent")
createEvent("BlobEvent")
createEvent("ClipboardEvent")
createEvent("CloseEvent")
createEvent("CompositionEvent")
createEvent("CustomEvent")
createEvent("DeviceMotionEvent")
createEvent("DeviceOrientationEvent")
createEvent("DragEvent")
createEvent("ErrorEvent")
createEvent("Event")
createEvent("Events")
createEvent("FocusEvent")
createEvent("FontFaceSetLoadEvent")
createEvent("FormDataEvent")
createEvent("GamepadEvent")
createEvent("HashChangeEvent")
createEvent("IDBVersionChangeEvent")
createEvent("InputEvent")
createEvent("KeyboardEvent")
createEvent("MediaEncryptedEvent")
createEvent("MediaKeyMessageEvent")
createEvent("MediaQueryListEvent")
createEvent("MediaStreamTrackEvent")
createEvent("MessageEvent")
createEvent("MouseEvent")
createEvent("MouseEvents")
createEvent("MutationEvent")
createEvent("MutationEvents")
createEvent("OfflineAudioCompletionEvent")
createEvent("PageTransitionEvent")
createEvent("PaymentMethodChangeEvent")
createEvent("PaymentRequestUpdateEvent")
createEvent("PictureInPictureEvent")
createEvent("PointerEvent")
createEvent("PopStateEvent")
createEvent("ProgressEvent")
createEvent("PromiseRejectionEvent")
createEvent("RTCDataChannelEvent")
createEvent("RTCDTMFToneChangeEvent")
createEvent("RTCErrorEvent")
createEvent("RTCPeerConnectionIceErrorEvent")
createEvent("RTCPeerConnectionIceEvent")
createEvent("RTCTrackEvent")
createEvent("SecurityPolicyViolationEvent")
createEvent("SpeechSynthesisErrorEvent")
createEvent("SpeechSynthesisEvent")
createEvent("StorageEvent")
createEvent("SubmitEvent")
createEvent("TouchEvent")
createEvent("TrackEvent")
createEvent("TransitionEvent")
createEvent("UIEvent")
createEvent("UIEvents")
createEvent("WebGLContextEvent")
createEvent("WheelEvent")
createEvent(string)
createNodeIterator(Node, number, null | NodeFilter)

Crea un objeto NodeIterator que puede usar para recorrer listas filtradas de nodos o elementos de un documento.

createProcessingInstruction(string, string)

Devuelve un nodo ProcessingInstruction cuyo destino es el destino y los datos son datos. Si el destino no coincide con name production, se producirá una excepción DOMException "InvalidCharacterError". Si los datos contienen "?>" se producirá una excepción DOMException "InvalidCharacterError".

createRange()

Devuelve un objeto de intervalo vacío que tiene ambos puntos de límite colocados al principio del documento.

createTextNode(string)

Crea una cadena de texto a partir del valor especificado.

createTreeWalker(Node, number, null | NodeFilter)

Crea un objeto TreeWalker que puede usar para recorrer listas filtradas de nodos o elementos de un documento.

execCommand(string, boolean, string)

Ejecuta un comando en el documento actual, la selección actual o el intervalo especificado.

exitFullscreen()

Impide que el elemento de pantalla completa del documento se muestre en pantalla completa y resuelva la promesa cuando haya terminado.

exitPictureInPicture()
exitPointerLock()
getElementById(string)

Devuelve una referencia al primer objeto con el valor especificado del atributo ID.

getElementsByClassName(string)

Devuelve un HTMLCollection de los elementos del objeto en el que se invocó el método (un documento o un elemento) que tienen todas las clases dadas por classNames. El argumento classNames se interpreta como una lista separada por espacios de clases.

getElementsByName(string)

Obtiene una colección de objetos basándose en el valor del atributo NAME o ID.

getElementsByTagName(string)
getElementsByTagName<K>(K)

Recupera una colección de objetos basándose en el nombre de elemento especificado.

getElementsByTagName<K>(K)
getElementsByTagNameNS("http://www.w3.org/1999/xhtml", string)

Si el espacio de nombres y localName son "*" devuelve una htmlCollection de todos los elementos descendientes.

Si solo el espacio de nombres es "*" devuelve una htmlCollection de todos los elementos descendientes cuyo nombre local es localName.

Si solo localName es "*" devuelve una htmlCollection de todos los elementos descendientes cuyo espacio de nombres es espacio de nombres.

De lo contrario, devuelve un HTMLCollection de todos los elementos descendientes cuyo espacio de nombres es espacio de nombres y el nombre local es localName.

getElementsByTagNameNS("http://www.w3.org/2000/svg", string)
getElementsByTagNameNS(null | string, string)
getSelection()

Devuelve un objeto que representa la selección actual del documento que se carga en el objeto que muestra una página web.

hasFocus()

Obtiene un valor que indica si el objeto tiene el foco actualmente.

hasStorageAccess()
importNode<T>(T, boolean)

Devuelve una copia del nodo. Si deep es true, la copia también incluye los descendientes del nodo.

Si el nodo es un documento o una raíz de sombra, produce una excepción DOMException "NotSupportedError".

open(string | URL, string, string)
open(string, string)

Abre una nueva ventana y carga un documento especificado por una dirección URL determinada. Además, abre una nueva ventana que usa el parámetro url y el parámetro name para recopilar la salida del método de escritura y el método writeln.

queryCommandEnabled(string)

Devuelve un valor booleano que indica si un comando especificado se puede ejecutar correctamente mediante execCommand, dado el estado actual del documento.

queryCommandIndeterm(string)

Devuelve un valor booleano que indica si el comando especificado está en estado indeterminado.

queryCommandState(string)

Devuelve un valor booleano que indica el estado actual del comando.

queryCommandSupported(string)

Devuelve un valor booleano que indica si el comando actual se admite en el intervalo actual.

queryCommandValue(string)

Devuelve el valor actual del documento, el intervalo o la selección actual del comando especificado.

releaseEvents()
removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)
removeEventListener<K>(K, (this: Document, ev: DocumentEventMap[K]) => any, boolean | EventListenerOptions)
requestStorageAccess()
write(string[])

Escribe una o varias expresiones HTML en un documento en la ventana especificada.

writeln(string[])

Escribe una o varias expresiones HTML, seguidas de un retorno de carro, en un documento de la ventana especificada.

Métodos heredados

append((string | Node)[])

Inserta nodos después del último elemento secundario del nodo, al tiempo que reemplaza las cadenas de los nodos por nodos de texto equivalentes.

Produce una excepción DOMException "HierarchyRequestError" si se infringen las restricciones del árbol de nodos.

appendChild<T>(T)
cloneNode(boolean)

Devuelve una copia del nodo. Si deep es true, la copia también incluye los descendientes del nodo.

compareDocumentPosition(Node)

Devuelve una máscara de bits que indica la posición de otro relativo al nodo.

contains(null | Node)

Devuelve true si otro es un descendiente inclusivo del nodo y false en caso contrario.

createExpression(string, null | XPathNSResolver)
createNSResolver(Node)
dispatchEvent(Event)

Envía un evento de evento sintético al destino y devuelve true si el valor de atributo cancelable del evento es false o su método preventDefault() no se invocó y false en caso contrario.

elementFromPoint(number, number)

Devuelve el elemento de la coordenada x especificada y la coordenada y especificada.

elementsFromPoint(number, number)
evaluate(string, Node, null | XPathNSResolver, number, null | XPathResult)
getAnimations()
getRootNode(GetRootNodeOptions)

Devuelve la raíz del nodo.

hasChildNodes()

Devuelve si el nodo tiene elementos secundarios.

insertBefore<T>(T, null | Node)
isDefaultNamespace(null | string)
isEqualNode(null | Node)

Devuelve si node y otherNode tienen las mismas propiedades.

isSameNode(null | Node)
lookupNamespaceURI(null | string)
lookupPrefix(null | string)
normalize()

Quita nodos de texto exclusivos vacíos y concatena los datos de los nodos Text exclusivos contiguos restantes en el primero de sus nodos.

prepend((string | Node)[])

Inserta nodos antes del primer elemento secundario del nodo, al tiempo que reemplaza las cadenas de los nodos por nodos de texto equivalentes.

Produce una excepción DOMException "HierarchyRequestError" si se infringen las restricciones del árbol de nodos.

querySelector<E>(string)
querySelector<K>(K)

Devuelve el primer elemento que es un descendiente del nodo que coincide con los selectores.

querySelector<K>(K)
querySelectorAll<E>(string)
querySelectorAll<K>(K)

Devuelve todos los descendientes de elementos del nodo que coinciden con los selectores.

querySelectorAll<K>(K)
removeChild<T>(T)
replaceChild<T>(Node, T)
replaceChildren((string | Node)[])

Reemplace todos los elementos secundarios del nodo por nodos, al tiempo que reemplaza las cadenas de los nodos por nodos de texto equivalentes.

Produce una excepción DOMException "HierarchyRequestError" si se infringen las restricciones del árbol de nodos.

Detalles de las propiedades

alinkColor

Advertencia

Esta API ya está en desuso.

Establece u obtiene el color de todos los vínculos activos del documento.

alinkColor: string

Valor de propiedad

string

all

Advertencia

Esta API ya está en desuso.

Devuelve una referencia a la colección de elementos contenidos por el objeto .

all: HTMLAllCollection

Valor de propiedad

HTMLAllCollection

anchors

Advertencia

Esta API ya está en desuso.

Recupera una colección de todos los objetos que tienen una propiedad name o id. Los objetos de esta colección están en orden de origen HTML.

anchors: HTMLCollectionOf<HTMLAnchorElement>

Valor de propiedad

HTMLCollectionOf<HTMLAnchorElement>

applets

Advertencia

Esta API ya está en desuso.

Recupera una colección de todos los objetos applet del documento.

applets: HTMLCollection

Valor de propiedad

HTMLCollection

bgColor

Advertencia

Esta API ya está en desuso.

Obsolescente. Establece o recupera un valor que indica el color de fondo detrás del objeto.

bgColor: string

Valor de propiedad

string

body

Especifica el principio y el final del cuerpo del documento.

body: HTMLElement

Valor de propiedad

HTMLElement

characterSet

Devuelve la codificación del documento.

characterSet: string

Valor de propiedad

string

charset

Advertencia

Esta API ya está en desuso.

This is a legacy alias of characterSet.

Obtiene o establece el juego de caracteres usado para codificar el objeto.

charset: string

Valor de propiedad

string

compatMode

Obtiene un valor que indica si el modo compatible con estándares está activado para el objeto .

compatMode: string

Valor de propiedad

string

contentType

Devuelve el tipo de contenido del documento.

contentType: string

Valor de propiedad

string

Devuelve las cookies HTTP que se aplican al documento. Si no hay cookies o cookies no se pueden aplicar a este recurso, se devolverá la cadena vacía.

Se puede establecer para agregar una nueva cookie al conjunto de cookies HTTP del elemento.

Si el contenido se encuentra en un origen único (por ejemplo, en un iframe con el atributo sandbox), se iniciará una excepción DOMException "SecurityError" al obtener y establecer.

cookie: string

Valor de propiedad

string

currentScript

Devuelve el elemento script o el elemento de script SVG, que se está ejecutando actualmente, siempre y cuando el elemento represente un script clásico. En el caso de la ejecución de script reentrant, devuelve el que más recientemente comenzó a ejecutarse entre los que aún no han terminado de ejecutarse.

Devuelve null si el documento no está ejecutando actualmente un script o un elemento de script SVG (por ejemplo, porque el script en ejecución es un controlador de eventos o un tiempo de espera), o si el script que se está ejecutando actualmente o el elemento de script SVG representa un script de módulo.

currentScript: null | HTMLOrSVGScriptElement

Valor de propiedad

null | HTMLOrSVGScriptElement

defaultView

Devuelve el objeto Window del documento activo.

defaultView: null | (Window & typeof globalThis)

Valor de propiedad

null | (Window & typeof globalThis)

designMode

Establece u obtiene un valor que indica si se puede editar el documento.

designMode: string

Valor de propiedad

string

dir

Establece o recupera un valor que indica el orden de lectura del objeto.

dir: string

Valor de propiedad

string

doctype

Obtiene un objeto que representa la declaración de tipo de documento asociada al documento actual.

doctype: null | DocumentType

Valor de propiedad

null | DocumentType

documentElement

Obtiene una referencia al nodo raíz del documento.

documentElement: HTMLElement

Valor de propiedad

HTMLElement

documentURI

Devuelve la dirección URL del documento.

documentURI: string

Valor de propiedad

string

domain

Advertencia

Esta API ya está en desuso.

Establece u obtiene el dominio de seguridad del documento.

domain: string

Valor de propiedad

string

embeds

Recupera una colección de todos los objetos insertados del documento.

embeds: HTMLCollectionOf<HTMLEmbedElement>

Valor de propiedad

HTMLCollectionOf<HTMLEmbedElement>

fgColor

Advertencia

Esta API ya está en desuso.

Establece u obtiene el color de primer plano (texto) del documento.

fgColor: string

Valor de propiedad

string

forms

Recupera una colección, en orden de origen, de todos los objetos de formulario del documento.

forms: HTMLCollectionOf<HTMLFormElement>

Valor de propiedad

HTMLCollectionOf<HTMLFormElement>

fullscreen

Advertencia

Esta API ya está en desuso.

fullscreen: boolean

Valor de propiedad

boolean

fullscreenEnabled

Devuelve true si el documento tiene la capacidad de mostrar elementos de pantalla completa y se admite la pantalla completa o false en caso contrario.

fullscreenEnabled: boolean

Valor de propiedad

boolean

head

Devuelve el elemento head.

head: HTMLHeadElement

Valor de propiedad

HTMLHeadElement

hidden

hidden: boolean

Valor de propiedad

boolean

images

Recupera una colección, en orden de origen, de objetos img en el documento.

images: HTMLCollectionOf<HTMLImageElement>

Valor de propiedad

HTMLCollectionOf<HTMLImageElement>

implementation

Obtiene el objeto de implementación del documento actual.

implementation: DOMImplementation

Valor de propiedad

DOMImplementation

inputEncoding

Advertencia

Esta API ya está en desuso.

This is a legacy alias of characterSet.

Devuelve la codificación de caracteres usada para crear la página web que se carga en el objeto de documento.

inputEncoding: string

Valor de propiedad

string

lastModified

Obtiene la fecha en que se modificó por última vez la página, si la página proporciona una.

lastModified: string

Valor de propiedad

string

linkColor

Advertencia

Esta API ya está en desuso.

Establece u obtiene el color de los vínculos del documento.

linkColor: string

Valor de propiedad

string

Recupera una colección de todos los objetos que especifican la propiedad href y todos los objetos de área del documento.

links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>

Valor de propiedad

HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>

location

Contiene información sobre la dirección URL actual.

Location location

Valor de propiedad

Location

mozCancelFullScreen

mozCancelFullScreen: any

Valor de propiedad

any

msExitFullscreen

msExitFullscreen: any

Valor de propiedad

any

onfullscreenchange

onfullscreenchange: null | (this: Document, ev: Event) => any

Valor de propiedad

null | (this: Document, ev: Event) => any

onfullscreenerror

onfullscreenerror: null | (this: Document, ev: Event) => any

Valor de propiedad

null | (this: Document, ev: Event) => any

onpointerlockchange

onpointerlockchange: null | (this: Document, ev: Event) => any

Valor de propiedad

null | (this: Document, ev: Event) => any

onpointerlockerror

onpointerlockerror: null | (this: Document, ev: Event) => any

Valor de propiedad

null | (this: Document, ev: Event) => any

onreadystatechange

Se desencadena cuando el estado del objeto ha cambiado.

onreadystatechange: null | (this: Document, ev: Event) => any

Valor de propiedad

null | (this: Document, ev: Event) => any

onvisibilitychange

onvisibilitychange: null | (this: Document, ev: Event) => any

Valor de propiedad

null | (this: Document, ev: Event) => any

ownerDocument

ownerDocument: null

Valor de propiedad

null

pictureInPictureEnabled

pictureInPictureEnabled: boolean

Valor de propiedad

boolean

plugins

Devuelve una htmlCollection de los elementos para insertar en el documento.

plugins: HTMLCollectionOf<HTMLEmbedElement>

Valor de propiedad

HTMLCollectionOf<HTMLEmbedElement>

readyState

Recupera un valor que indica el estado actual del objeto.

readyState: DocumentReadyState

Valor de propiedad

DocumentReadyState

referrer

Obtiene la dirección URL de la ubicación que hizo referencia al usuario a la página actual.

referrer: string

Valor de propiedad

string

rootElement

Advertencia

Esta API ya está en desuso.

rootElement: null | SVGSVGElement

Valor de propiedad

null | SVGSVGElement

scripts

Recupera una colección de todos los objetos de script del documento.

scripts: HTMLCollectionOf<HTMLScriptElement>

Valor de propiedad

HTMLCollectionOf<HTMLScriptElement>

scrollingElement

scrollingElement: null | Element

Valor de propiedad

null | Element

timeline

timeline: DocumentTimeline

Valor de propiedad

DocumentTimeline

title

Contiene el título del documento.

title: string

Valor de propiedad

string

URL

Establece u obtiene la dirección URL del documento actual.

URL: string

Valor de propiedad

string

visibilityState

visibilityState: DocumentVisibilityState

Valor de propiedad

DocumentVisibilityState

vlinkColor

Advertencia

Esta API ya está en desuso.

Establece u obtiene el color de los vínculos que el usuario ha visitado.

vlinkColor: string

Valor de propiedad

string

webkitExitFullscreen

webkitExitFullscreen: void

Valor de propiedad

void

Detalles de las propiedades heredadas

activeElement

Devuelve el elemento más profundo del documento a través del cual o a qué eventos clave se enrutan. Esto es, aproximadamente hablando, el elemento centrado en el documento.

Para los fines de esta API, cuando se centra un contexto de exploración secundario, su contenedor se centra en el contexto de exploración primario. Por ejemplo, si el usuario mueve el foco a un control de texto en un iframe, el iframe es el elemento devuelto por la API activeElement en el documento de nodo del iframe.

Del mismo modo, cuando el elemento centrado está en un árbol de nodos diferente al documentOrShadowRoot, el elemento devuelto será el host que se encuentra en el mismo árbol de nodos que documentOrShadowRoot si documentOrShadowRoot es un antecesor inclusivo incluido incluido del elemento centrado y null si no.

activeElement: null | Element

Valor de propiedad

null | Element

heredado de DocumentOrShadowRoot.activeElement

adoptedStyleSheets

adoptedStyleSheets: CSSStyleSheet[]

Valor de propiedad

CSSStyleSheet[]

Heredado de DocumentOrShadowRoot.adoptedStyleSheets

ATTRIBUTE_NODE

ATTRIBUTE_NODE: number

Valor de propiedad

number

heredado de Node.ATTRIBUTE_NODE

baseURI

Devuelve la dirección URL base del documento del nodo del nodo.

baseURI: string

Valor de propiedad

string

heredado de Node.baseURI

CDATA_SECTION_NODE

node es un nodo CDATASection.

CDATA_SECTION_NODE: number

Valor de propiedad

number

heredado de Node.CDATA_SECTION_NODE

childElementCount

childElementCount: number

Valor de propiedad

number

heredado de ParentNode.childElementCount

childNodes

Devuelve los elementos secundarios.

childNodes: NodeListOf<ChildNode>

Valor de propiedad

NodeListOf<ChildNode>

Heredado de Node.childNodes

children

Devuelve los elementos secundarios.

children: HTMLCollection

Valor de propiedad

HTMLCollection

Heredado de ParentNode.children

COMMENT_NODE

node es un nodo Comment.

COMMENT_NODE: number

Valor de propiedad

number

heredado de Node.COMMENT_NODE

DOCUMENT_FRAGMENT_NODE

node es un nodo DocumentFragment.

DOCUMENT_FRAGMENT_NODE: number

Valor de propiedad

number

heredado de Node.DOCUMENT_FRAGMENT_NODE

DOCUMENT_NODE

node es un documento.

DOCUMENT_NODE: number

Valor de propiedad

number

heredado de Node.DOCUMENT_NODE

DOCUMENT_POSITION_CONTAINED_BY

Se establece cuando otro es un descendiente del nodo.

DOCUMENT_POSITION_CONTAINED_BY: number

Valor de propiedad

number

heredado de Node.DOCUMENT_POSITION_CONTAINED_BY

DOCUMENT_POSITION_CONTAINS

Se establece cuando otro es un antecesor de nodo.

DOCUMENT_POSITION_CONTAINS: number

Valor de propiedad

number

heredado de Node.DOCUMENT_POSITION_CONTAINS

DOCUMENT_POSITION_DISCONNECTED

Se establece cuando el nodo y otros no están en el mismo árbol.

DOCUMENT_POSITION_DISCONNECTED: number

Valor de propiedad

number

heredado de Node.DOCUMENT_POSITION_DISCONNECTED

DOCUMENT_POSITION_FOLLOWING

Se establece cuando otro nodo sigue.

DOCUMENT_POSITION_FOLLOWING: number

Valor de propiedad

number

heredado de Node.DOCUMENT_POSITION_FOLLOWING

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number

Valor de propiedad

number

heredado de Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

DOCUMENT_POSITION_PRECEDING

Se establece cuando otro nodo es anterior.

DOCUMENT_POSITION_PRECEDING: number

Valor de propiedad

number

heredado de Node.DOCUMENT_POSITION_PRECEDING

DOCUMENT_TYPE_NODE

node es un tipo de documento.

DOCUMENT_TYPE_NODE: number

Valor de propiedad

number

heredado de Node.DOCUMENT_TYPE_NODE

ELEMENT_NODE

node es un elemento .

ELEMENT_NODE: number

Valor de propiedad

number

heredado de Node.ELEMENT_NODE

ENTITY_NODE

ENTITY_NODE: number

Valor de propiedad

number

heredado de Node.ENTITY_NODE

ENTITY_REFERENCE_NODE

ENTITY_REFERENCE_NODE: number

Valor de propiedad

number

heredado de Node.ENTITY_REFERENCE_NODE

firstChild

Devuelve el primer elemento secundario.

firstChild: null | ChildNode

Valor de propiedad

null | ChildNode

Heredado de Node.firstChild

firstElementChild

Devuelve el primer elemento secundario que es un elemento y null en caso contrario.

firstElementChild: null | Element

Valor de propiedad

null | Element

Heredado de ParentNode.firstElementChild

fonts

fonts: FontFaceSet

Valor de propiedad

FontFaceSet

Heredado de FontFaceSource.fonts

fullscreenElement

Devuelve el elemento de pantalla completa del documento.

fullscreenElement: null | Element

Valor de propiedad

null | Element

heredado de DocumentOrShadowRoot.fullscreenElement

isConnected

Devuelve true si el nodo está conectado y false en caso contrario.

isConnected: boolean

Valor de propiedad

boolean

Heredado de Node.isConnected

lastChild

Devuelve el último elemento secundario.

lastChild: null | ChildNode

Valor de propiedad

null | ChildNode

Heredado de Node.lastChild

lastElementChild

Devuelve el último elemento secundario que es un elemento y null en caso contrario.

lastElementChild: null | Element

Valor de propiedad

null | Element

Heredado de ParentNode.lastElementChild

nextSibling

Devuelve el siguiente elemento del mismo nivel.

nextSibling: null | ChildNode

Valor de propiedad

null | ChildNode

heredado de Node.nextSibling

nodeName

Devuelve una cadena adecuada para el tipo de nodo.

nodeName: string

Valor de propiedad

string

heredado de Node.nodeName

nodeType

Devuelve el tipo de nodo.

nodeType: number

Valor de propiedad

number

Heredado de Node.nodeType

nodeValue

nodeValue: null | string

Valor de propiedad

null | string

Heredado de Node.nodeValue

NOTATION_NODE

NOTATION_NODE: number

Valor de propiedad

number

heredado de Node.NOTATION_NODE

onabort

Se desencadena cuando el usuario anula la descarga.

onabort: null | (this: GlobalEventHandlers, ev: UIEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: UIEvent) => any

heredado de GlobalEventHandlers.onabort

onanimationcancel

onanimationcancel: null | (this: GlobalEventHandlers, ev: AnimationEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: AnimationEvent) => any

heredado de GlobalEventHandlers.onanimationcancel

onanimationend

onanimationend: null | (this: GlobalEventHandlers, ev: AnimationEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: AnimationEvent) => any

heredado de GlobalEventHandlers.onanimationend

onanimationiteration

onanimationiteration: null | (this: GlobalEventHandlers, ev: AnimationEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: AnimationEvent) => any

heredado de GlobalEventHandlers.onanimationiteration

onanimationstart

onanimationstart: null | (this: GlobalEventHandlers, ev: AnimationEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: AnimationEvent) => any

Heredado de GlobalEventHandlers.onanimationstart

onauxclick

onauxclick: null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Heredado de GlobalEventHandlers.onauxclick

onbeforeinput

onbeforeinput: null | (this: GlobalEventHandlers, ev: InputEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: InputEvent) => any

Heredado de GlobalEventHandlers.onbeforeinput

onblur

Se desencadena cuando el objeto pierde el foco de entrada.

onblur: null | (this: GlobalEventHandlers, ev: FocusEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: FocusEvent) => any

Heredado de GlobalEventHandlers.onblur

oncancel

oncancel: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.oncancel

oncanplay

Se produce cuando la reproducción es posible, pero requeriría un mayor almacenamiento en búfer.

oncanplay: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.oncanplay

oncanplaythrough

oncanplaythrough: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Heredado de GlobalEventHandlers.oncanplaythrough

onchange

Se desencadena cuando el contenido del objeto o la selección han cambiado.

onchange: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onchange

onclick

Se desencadena cuando el usuario hace clic en el botón izquierdo del mouse en el objeto

onclick: null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: MouseEvent) => any

heredado de GlobalEventHandlers.onclick

onclose

onclose: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onclose

oncontextmenu

Se desencadena cuando el usuario hace clic en el botón derecho del mouse en el área cliente, abriendo el menú contextual.

oncontextmenu: null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: MouseEvent) => any

heredado de GlobalEventHandlers.oncontextmenu

oncopy

oncopy: null | (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any

Valor de propiedad

null | (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any

heredado de DocumentAndElementEventHandlers.oncopy

oncuechange

oncuechange: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Heredado de GlobalEventHandlers.oncuechange

oncut

oncut: null | (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any

Valor de propiedad

null | (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any

heredado de DocumentAndElementEventHandlers.oncut

ondblclick

Se desencadena cuando el usuario hace doble clic en el objeto.

ondblclick: null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Heredado de GlobalEventHandlers.ondblclick

ondrag

Se activa en el objeto de origen continuamente durante una operación de arrastre.

ondrag: null | (this: GlobalEventHandlers, ev: DragEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: DragEvent) => any

heredado de GlobalEventHandlers.ondrag

ondragend

Se activa en el objeto de origen cuando el usuario suelta el mouse al cerrar una operación de arrastre.

ondragend: null | (this: GlobalEventHandlers, ev: DragEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: DragEvent) => any

heredado de GlobalEventHandlers.ondragend

ondragenter

Se activa en el elemento de destino cuando el usuario arrastra el objeto a un destino de colocación válido.

ondragenter: null | (this: GlobalEventHandlers, ev: DragEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: DragEvent) => any

heredado de GlobalEventHandlers.ondragenter

ondragleave

Se activa en el objeto de destino cuando el usuario mueve el mouse fuera de un destino de colocación válido durante una operación de arrastre.

ondragleave: null | (this: GlobalEventHandlers, ev: DragEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: DragEvent) => any

heredado de GlobalEventHandlers.ondragleave

ondragover

Se activa en el elemento de destino continuamente mientras el usuario arrastra el objeto sobre un destino de colocación válido.

ondragover: null | (this: GlobalEventHandlers, ev: DragEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: DragEvent) => any

Heredado de GlobalEventHandlers.ondragover

ondragstart

Se activa en el objeto de origen cuando el usuario empieza a arrastrar una selección de texto o un objeto seleccionado.

ondragstart: null | (this: GlobalEventHandlers, ev: DragEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: DragEvent) => any

heredado de GlobalEventHandlers.ondragstart

ondrop

ondrop: null | (this: GlobalEventHandlers, ev: DragEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: DragEvent) => any

heredado de GlobalEventHandlers.ondrop

ondurationchange

Se produce cuando se actualiza el atributo duration.

ondurationchange: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.ondurationchange

onemptied

Se produce cuando el elemento multimedia se restablece a su estado inicial.

onemptied: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onemptied

onended

Se produce cuando se alcanza el final de la reproducción.

onended: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Heredado de GlobalEventHandlers.onended

onerror

Se desencadena cuando se produce un error durante la carga de objetos.

onerror: OnErrorEventHandler

Valor de propiedad

OnErrorEventHandler

Heredado de GlobalEventHandlers.onerror

onfocus

Se desencadena cuando el objeto recibe el foco.

onfocus: null | (this: GlobalEventHandlers, ev: FocusEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: FocusEvent) => any

heredado de GlobalEventHandlers.onfocus

onformdata

onformdata: null | (this: GlobalEventHandlers, ev: FormDataEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: FormDataEvent) => any

Heredado de GlobalEventHandlers.onformdata

ongotpointercapture

ongotpointercapture: null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Heredado de GlobalEventHandlers.ongotpointercapture

oninput

oninput: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.oninput

oninvalid

oninvalid: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Heredado de GlobalEventHandlers.oninvalid

onkeydown

Se activa cuando el usuario presiona una tecla.

onkeydown: null | (this: GlobalEventHandlers, ev: KeyboardEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: KeyboardEvent) => any

Heredado de GlobalEventHandlers.onkeydown

onkeypress

Advertencia

Esta API ya está en desuso.

Se activa cuando el usuario presiona una tecla alfanumérica.

onkeypress: null | (this: GlobalEventHandlers, ev: KeyboardEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: KeyboardEvent) => any

heredado de GlobalEventHandlers.onkeypress

onkeyup

Se desencadena cuando el usuario libera una clave.

onkeyup: null | (this: GlobalEventHandlers, ev: KeyboardEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: KeyboardEvent) => any

heredado de GlobalEventHandlers.onkeyup

onload

Se desencadena inmediatamente después de que el explorador cargue el objeto.

onload: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onload

onloadeddata

Se produce cuando los datos multimedia se cargan en la posición de reproducción actual.

onloadeddata: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

se hereda de GlobalEventHandlers.onloadeddata

onloadedmetadata

Se produce cuando se han determinado la duración y las dimensiones del medio.

onloadedmetadata: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onloadedmetadata

onloadstart

Se produce cuando Internet Explorer comienza a buscar datos multimedia.

onloadstart: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onloadstart

onlostpointercapture

onlostpointercapture: null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: PointerEvent) => any

heredado de GlobalEventHandlers.onlostpointercapture

onmousedown

Se desencadena cuando el usuario hace clic en el objeto con cualquiera de los botones del mouse.

onmousedown: null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: MouseEvent) => any

heredado de GlobalEventHandlers.onmousedown

onmouseenter

onmouseenter: null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: MouseEvent) => any

heredado de GlobalEventHandlers.onmouseenter

onmouseleave

onmouseleave: null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Heredado de GlobalEventHandlers.onmouseleave

onmousemove

Se desencadena cuando el usuario mueve el mouse sobre el objeto.

onmousemove: null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: MouseEvent) => any

heredado de GlobalEventHandlers.onmousemove

onmouseout

Se desencadena cuando el usuario mueve el puntero del mouse fuera de los límites del objeto.

onmouseout: null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: MouseEvent) => any

heredado de GlobalEventHandlers.onmouseout

onmouseover

Se desencadena cuando el usuario mueve el puntero del mouse al objeto .

onmouseover: null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: MouseEvent) => any

heredado de GlobalEventHandlers.onmouseover

onmouseup

Se desencadena cuando el usuario suelta un botón del mouse mientras el mouse está sobre el objeto.

onmouseup: null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: MouseEvent) => any

Heredado de GlobalEventHandlers.onmouseup

onpaste

onpaste: null | (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any

Valor de propiedad

null | (this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any

heredado de DocumentAndElementEventHandlers.onpaste

onpause

Se produce cuando la reproducción está en pausa.

onpause: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onpause

onplay

Se produce cuando se solicita el método play.

onplay: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

se hereda de GlobalEventHandlers.onplay

onplaying

Se produce cuando se ha iniciado la reproducción del audio o el vídeo.

onplaying: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

se hereda de GlobalEventHandlers.onplaying

onpointercancel

onpointercancel: null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Heredado de GlobalEventHandlers.onpointercancel

onpointerdown

onpointerdown: null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: PointerEvent) => any

heredado de GlobalEventHandlers.onpointerdown

onpointerenter

onpointerenter: null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: PointerEvent) => any

heredado de GlobalEventHandlers.onpointerenter

onpointerleave

onpointerleave: null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Heredado de GlobalEventHandlers.onpointerleave

onpointermove

onpointermove: null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: PointerEvent) => any

heredado de GlobalEventHandlers.onpointermove

onpointerout

onpointerout: null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: PointerEvent) => any

se hereda de GlobalEventHandlers.onpointerout

onpointerover

onpointerover: null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: PointerEvent) => any

heredado de GlobalEventHandlers.onpointerover

onpointerup

onpointerup: null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: PointerEvent) => any

Se hereda de GlobalEventHandlers.onpointerup

onprogress

Se produce para indicar el progreso durante la descarga de datos multimedia.

onprogress: null | (this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any

Heredado de GlobalEventHandlers.onprogress

onratechange

Se produce cuando la velocidad de reproducción aumenta o disminuye.

onratechange: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Heredado de GlobalEventHandlers.onratechange

onreset

Se desencadena cuando el usuario restablece un formulario.

onreset: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onreset

onresize

onresize: null | (this: GlobalEventHandlers, ev: UIEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: UIEvent) => any

se hereda de GlobalEventHandlers.onresize

onscroll

Se activa cuando el usuario cambia la posición del cuadro de desplazamiento en la barra de desplazamiento del objeto.

onscroll: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Heredado de GlobalEventHandlers.onscroll

onsecuritypolicyviolation

onsecuritypolicyviolation: null | (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any

heredado de GlobalEventHandlers.onsecuritypolicyviolation

onseeked

Se produce cuando finaliza la operación de búsqueda.

onseeked: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Heredado de GlobalEventHandlers.onseeked

onseeking

Se produce cuando se mueve la posición de reproducción actual.

onseeking: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onseeking

onselect

Se activa cuando cambia la selección actual.

onselect: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Se hereda de GlobalEventHandlers.onselect

onselectionchange

onselectionchange: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Se hereda de GlobalEventHandlers.onselectionchange

onselectstart

onselectstart: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Heredado de GlobalEventHandlers.onselectstart

onslotchange

onslotchange: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Heredado de GlobalEventHandlers.onslotchange

onstalled

Se produce cuando la descarga se ha detenido.

onstalled: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onstalled

onsubmit

onsubmit: null | (this: GlobalEventHandlers, ev: SubmitEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: SubmitEvent) => any

Heredado de GlobalEventHandlers.onsubmit

onsuspend

Se produce si la operación de carga se ha detenido intencionadamente.

onsuspend: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onsuspend

ontimeupdate

Se produce para indicar la posición de reproducción actual.

ontimeupdate: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

se hereda de GlobalEventHandlers.ontimeupdate

ontoggle

ontoggle: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Se hereda de GlobalEventHandlers.ontoggle

ontouchcancel

ontouchcancel?: null | (this: GlobalEventHandlers, ev: TouchEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: TouchEvent) => any

heredado de GlobalEventHandlers.ontouchcancel

ontouchend

ontouchend?: null | (this: GlobalEventHandlers, ev: TouchEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: TouchEvent) => any

heredado de GlobalEventHandlers.ontouchend

ontouchmove

ontouchmove?: null | (this: GlobalEventHandlers, ev: TouchEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: TouchEvent) => any

heredado de GlobalEventHandlers.ontouchmove

ontouchstart

ontouchstart?: null | (this: GlobalEventHandlers, ev: TouchEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: TouchEvent) => any

Heredado de GlobalEventHandlers.ontouchstart

ontransitioncancel

ontransitioncancel: null | (this: GlobalEventHandlers, ev: TransitionEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: TransitionEvent) => any

heredado de GlobalEventHandlers.ontransitioncancel

ontransitionend

ontransitionend: null | (this: GlobalEventHandlers, ev: TransitionEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: TransitionEvent) => any

heredado de GlobalEventHandlers.ontransitionend

ontransitionrun

ontransitionrun: null | (this: GlobalEventHandlers, ev: TransitionEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: TransitionEvent) => any

heredado de GlobalEventHandlers.ontransitionrun

ontransitionstart

ontransitionstart: null | (this: GlobalEventHandlers, ev: TransitionEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: TransitionEvent) => any

Heredado de GlobalEventHandlers.ontransitionstart

onvolumechange

Se produce cuando se cambia el volumen, o la reproducción se silencia o se desactiva.

onvolumechange: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Se hereda de GlobalEventHandlers.onvolumechange

onwaiting

Se produce cuando la reproducción se detiene porque el siguiente fotograma de un recurso de vídeo no está disponible.

onwaiting: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

se hereda de GlobalEventHandlers.onwaiting

onwebkitanimationend

Advertencia

Esta API ya está en desuso.

This is a legacy alias of onanimationend.

onwebkitanimationend: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onwebkitanimationend

onwebkitanimationiteration

Advertencia

Esta API ya está en desuso.

This is a legacy alias of onanimationiteration.

onwebkitanimationiteration: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onwebkitanimationiteration

onwebkitanimationstart

Advertencia

Esta API ya está en desuso.

This is a legacy alias of onanimationstart.

onwebkitanimationstart: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

Heredado de GlobalEventHandlers.onwebkitanimationstart

onwebkittransitionend

Advertencia

Esta API ya está en desuso.

This is a legacy alias of ontransitionend.

onwebkittransitionend: null | (this: GlobalEventHandlers, ev: Event) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: Event) => any

heredado de GlobalEventHandlers.onwebkittransitionend

onwheel

onwheel: null | (this: GlobalEventHandlers, ev: WheelEvent) => any

Valor de propiedad

null | (this: GlobalEventHandlers, ev: WheelEvent) => any

heredado de GlobalEventHandlers.onwheel

parentElement

Devuelve el elemento primario.

parentElement: null | HTMLElement

Valor de propiedad

null | HTMLElement

Heredado de Node.parentElement

parentNode

Devuelve el elemento primario.

parentNode: null | ParentNode

Valor de propiedad

null | ParentNode

heredado de Node.parentNode

pictureInPictureElement

pictureInPictureElement: null | Element

Valor de propiedad

null | Element

heredado de DocumentOrShadowRoot.pictureInPictureElement

pointerLockElement

pointerLockElement: null | Element

Valor de propiedad

null | Element

Heredado de DocumentOrShadowRoot.pointerLockElement

previousSibling

Devuelve el elemento relacionado anterior.

previousSibling: null | ChildNode

Valor de propiedad

null | ChildNode

Heredado de Node.previousSibling

PROCESSING_INSTRUCTION_NODE

node es un nodo ProcessingInstruction.

PROCESSING_INSTRUCTION_NODE: number

Valor de propiedad

number

heredado de Node.PROCESSING_INSTRUCTION_NODE

styleSheets

Recupera una colección de objetos styleSheet que representan las hojas de estilos que corresponden a cada instancia de un vínculo o objeto de estilo del documento.

styleSheets: StyleSheetList

Valor de propiedad

StyleSheetList

Heredado de DocumentOrShadowRoot.styleSheets

textContent

textContent: null | string

Valor de propiedad

null | string

Heredado de Node.textContent

TEXT_NODE

node es un nodo Text.

TEXT_NODE: number

Valor de propiedad

number

heredado de Node.TEXT_NODE

Detalles del método

addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)

function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions)

Parámetros

type

string

listener

EventListenerOrEventListenerObject

options

boolean | AddEventListenerOptions

addEventListener<K>(K, (this: Document, ev: DocumentEventMap[K]) => any, boolean | AddEventListenerOptions)

function addEventListener<K>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions)

Parámetros

type

K

listener

(this: Document, ev: DocumentEventMap[K]) => any

options

boolean | AddEventListenerOptions

adoptNode<T>(T)

Mueve el nodo de otro documento y lo devuelve.

Si el nodo es un documento, inicia una excepción DOMException "NotSupportedError" o, si el nodo es una raíz de sombra, produce una excepción DOMException "HierarchyRequestError".

function adoptNode<T>(node: T): T

Parámetros

node

T

Devoluciones

T

captureEvents()

Advertencia

Esta API ya está en desuso.

function captureEvents()

caretRangeFromPoint(number, number)

Advertencia

Esta API ya está en desuso.

function caretRangeFromPoint(x: number, y: number): null | Range

Parámetros

x

number

y

number

Devoluciones

null | Range

clear()

Advertencia

Esta API ya está en desuso.

function clear()

close()

Cierra un flujo de salida y fuerza a que se muestren los datos enviados.

function close()

createAttribute(string)

Crea un objeto de atributo con un nombre especificado.

function createAttribute(localName: string): Attr

Parámetros

localName

string

Devoluciones

Attr

createAttributeNS(null | string, string)

function createAttributeNS(namespace: null | string, qualifiedName: string): Attr

Parámetros

namespace

null | string

qualifiedName

string

Devoluciones

Attr

createCDATASection(string)

Devuelve un nodo CDATASection cuyos datos son datos.

function createCDATASection(data: string): CDATASection

Parámetros

data

string

Devoluciones

CDATASection

createComment(string)

Crea un objeto de comentario con los datos especificados.

function createComment(data: string): Comment

Parámetros

data

string

Establece los datos del objeto de comentario.

Devoluciones

Comment

createDocumentFragment()

Crea un nuevo documento.

function createDocumentFragment(): DocumentFragment

Devoluciones

DocumentFragment

createElement(string, ElementCreationOptions)

function createElement(tagName: string, options?: ElementCreationOptions): HTMLElement

Parámetros

tagName

string

options

ElementCreationOptions

Devoluciones

HTMLElement

createElement<K>(K, ElementCreationOptions)

Crea una instancia del elemento para la etiqueta especificada.

function createElement<K>(tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]

Parámetros

tagName

K

Nombre de un elemento.

options

ElementCreationOptions

Devoluciones

HTMLElementTagNameMap[K]

createElement<K>(K, ElementCreationOptions)

Advertencia

Esta API ya está en desuso.

function createElement<K>(tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]

Parámetros

tagName

K

options

ElementCreationOptions

Devoluciones

HTMLElementDeprecatedTagNameMap[K]

createElementNS("http://www.w3.org/1999/xhtml", string)

Devuelve un elemento con espacio de nombres de espacio de nombres. Su prefijo de espacio de nombres será todo antes de ":" (U+003E) en qualifiedName o null. Su nombre local será todo después de ":" (U+003E) en qualifiedName o qualifiedName.

Si localName no coincide con name production, se producirá la excepción DOMException "InvalidCharacterError".

Si una de las condiciones siguientes es true, se producirá una excepción DOMException "NamespaceError":

localName no coincide con la producción de QName. El prefijo de espacio de nombres no es null y el espacio de nombres es la cadena vacía. El prefijo del espacio de nombres es "xml" y el espacio de nombres no es el espacio de nombres XML. el prefijo qualifiedName o namespace es "xmlns" y el espacio de nombres no es el espacio de nombres XMLNS. namespace es el espacio de nombres XMLNS y ni qualifiedName ni el prefijo del espacio de nombres son "xmlns".

Cuando se proporciona, las opciones se pueden usar para crear un elemento integrado personalizado.

function createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement

Parámetros

namespaceURI

"http://www.w3.org/1999/xhtml"

qualifiedName

string

Devoluciones

HTMLElement

createElementNS("http://www.w3.org/2000/svg", string)

function createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement

Parámetros

namespaceURI

"http://www.w3.org/2000/svg"

qualifiedName

string

Devoluciones

SVGElement

createElementNS(null | string, string, ElementCreationOptions)

function createElementNS(namespaceURI: null | string, qualifiedName: string, options?: ElementCreationOptions): Element

Parámetros

namespaceURI

null | string

qualifiedName

string

options

ElementCreationOptions

Devoluciones

Element

createElementNS(null | string, string, string | ElementCreationOptions)

function createElementNS(namespace: null | string, qualifiedName: string, options?: string | ElementCreationOptions): Element

Parámetros

namespace

null | string

qualifiedName

string

options

string | ElementCreationOptions

Devoluciones

Element

createElementNS<K>("http://www.w3.org/2000/svg", K)

function createElementNS<K>(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: K): SVGElementTagNameMap[K]

Parámetros

namespaceURI

"http://www.w3.org/2000/svg"

qualifiedName

K

Devoluciones

SVGElementTagNameMap[K]

createEvent("AnimationEvent")

function createEvent(eventInterface: "AnimationEvent"): AnimationEvent

Parámetros

eventInterface

"AnimationEvent"

Devoluciones

AnimationEvent

createEvent("AnimationPlaybackEvent")

function createEvent(eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEvent

Parámetros

eventInterface

"AnimationPlaybackEvent"

Devoluciones

AnimationPlaybackEvent

createEvent("AudioProcessingEvent")

function createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent

Parámetros

eventInterface

"AudioProcessingEvent"

Devoluciones

AudioProcessingEvent

createEvent("BeforeUnloadEvent")

function createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent

Parámetros

eventInterface

"BeforeUnloadEvent"

Devoluciones

BeforeUnloadEvent

createEvent("BlobEvent")

function createEvent(eventInterface: "BlobEvent"): BlobEvent

Parámetros

eventInterface

"BlobEvent"

Devoluciones

BlobEvent

createEvent("ClipboardEvent")

function createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent

Parámetros

eventInterface

"ClipboardEvent"

Devoluciones

ClipboardEvent

createEvent("CloseEvent")

function createEvent(eventInterface: "CloseEvent"): CloseEvent

Parámetros

eventInterface

"CloseEvent"

Devoluciones

CloseEvent

createEvent("CompositionEvent")

function createEvent(eventInterface: "CompositionEvent"): CompositionEvent

Parámetros

eventInterface

"CompositionEvent"

Devoluciones

CompositionEvent

createEvent("CustomEvent")

function createEvent(eventInterface: "CustomEvent"): CustomEvent<any>

Parámetros

eventInterface

"CustomEvent"

Devoluciones

CustomEvent<any>

createEvent("DeviceMotionEvent")

function createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent

Parámetros

eventInterface

"DeviceMotionEvent"

Devoluciones

DeviceMotionEvent

createEvent("DeviceOrientationEvent")

function createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent

Parámetros

eventInterface

"DeviceOrientationEvent"

Devoluciones

DeviceOrientationEvent

createEvent("DragEvent")

function createEvent(eventInterface: "DragEvent"): DragEvent

Parámetros

eventInterface

"DragEvent"

Devoluciones

DragEvent

createEvent("ErrorEvent")

function createEvent(eventInterface: "ErrorEvent"): ErrorEvent

Parámetros

eventInterface

"ErrorEvent"

Devoluciones

ErrorEvent

createEvent("Event")

function createEvent(eventInterface: "Event"): Event

Parámetros

eventInterface

"Event"

Devoluciones

Event

createEvent("Events")

function createEvent(eventInterface: "Events"): Event

Parámetros

eventInterface

"Events"

Devoluciones

Event

createEvent("FocusEvent")

function createEvent(eventInterface: "FocusEvent"): FocusEvent

Parámetros

eventInterface

"FocusEvent"

Devoluciones

FocusEvent

createEvent("FontFaceSetLoadEvent")

function createEvent(eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEvent

Parámetros

eventInterface

"FontFaceSetLoadEvent"

Devoluciones

FontFaceSetLoadEvent

createEvent("FormDataEvent")

function createEvent(eventInterface: "FormDataEvent"): FormDataEvent

Parámetros

eventInterface

"FormDataEvent"

Devoluciones

FormDataEvent

createEvent("GamepadEvent")

function createEvent(eventInterface: "GamepadEvent"): GamepadEvent

Parámetros

eventInterface

"GamepadEvent"

Devoluciones

GamepadEvent

createEvent("HashChangeEvent")

function createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent

Parámetros

eventInterface

"HashChangeEvent"

Devoluciones

HashChangeEvent

createEvent("IDBVersionChangeEvent")

function createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent

Parámetros

eventInterface

"IDBVersionChangeEvent"

Devoluciones

IDBVersionChangeEvent

createEvent("InputEvent")

function createEvent(eventInterface: "InputEvent"): InputEvent

Parámetros

eventInterface

"InputEvent"

Devoluciones

InputEvent

createEvent("KeyboardEvent")

function createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent

Parámetros

eventInterface

"KeyboardEvent"

Devoluciones

KeyboardEvent

createEvent("MediaEncryptedEvent")

function createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent

Parámetros

eventInterface

"MediaEncryptedEvent"

Devoluciones

MediaEncryptedEvent

createEvent("MediaKeyMessageEvent")

function createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent

Parámetros

eventInterface

"MediaKeyMessageEvent"

Devoluciones

MediaKeyMessageEvent

createEvent("MediaQueryListEvent")

function createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent

Parámetros

eventInterface

"MediaQueryListEvent"

Devoluciones

MediaQueryListEvent

createEvent("MediaStreamTrackEvent")

function createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent

Parámetros

eventInterface

"MediaStreamTrackEvent"

Devoluciones

MediaStreamTrackEvent

createEvent("MessageEvent")

function createEvent(eventInterface: "MessageEvent"): MessageEvent<any>

Parámetros

eventInterface

"MessageEvent"

Devoluciones

MessageEvent<any>

createEvent("MouseEvent")

function createEvent(eventInterface: "MouseEvent"): MouseEvent

Parámetros

eventInterface

"MouseEvent"

Devoluciones

MouseEvent

createEvent("MouseEvents")

function createEvent(eventInterface: "MouseEvents"): MouseEvent

Parámetros

eventInterface

"MouseEvents"

Devoluciones

MouseEvent

createEvent("MutationEvent")

function createEvent(eventInterface: "MutationEvent"): MutationEvent

Parámetros

eventInterface

"MutationEvent"

Devoluciones

MutationEvent

createEvent("MutationEvents")

function createEvent(eventInterface: "MutationEvents"): MutationEvent

Parámetros

eventInterface

"MutationEvents"

Devoluciones

MutationEvent

createEvent("OfflineAudioCompletionEvent")

function createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent

Parámetros

eventInterface

"OfflineAudioCompletionEvent"

Devoluciones

OfflineAudioCompletionEvent

createEvent("PageTransitionEvent")

function createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent

Parámetros

eventInterface

"PageTransitionEvent"

Devoluciones

PageTransitionEvent

createEvent("PaymentMethodChangeEvent")

function createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent

Parámetros

eventInterface

"PaymentMethodChangeEvent"

Devoluciones

PaymentMethodChangeEvent

createEvent("PaymentRequestUpdateEvent")

function createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent

Parámetros

eventInterface

"PaymentRequestUpdateEvent"

Devoluciones

PaymentRequestUpdateEvent

createEvent("PictureInPictureEvent")

function createEvent(eventInterface: "PictureInPictureEvent"): PictureInPictureEvent

Parámetros

eventInterface

"PictureInPictureEvent"

Devoluciones

PictureInPictureEvent

createEvent("PointerEvent")

function createEvent(eventInterface: "PointerEvent"): PointerEvent

Parámetros

eventInterface

"PointerEvent"

Devoluciones

PointerEvent

createEvent("PopStateEvent")

function createEvent(eventInterface: "PopStateEvent"): PopStateEvent

Parámetros

eventInterface

"PopStateEvent"

Devoluciones

PopStateEvent

createEvent("ProgressEvent")

function createEvent(eventInterface: "ProgressEvent"): ProgressEvent<EventTarget>

Parámetros

eventInterface

"ProgressEvent"

Devoluciones

ProgressEvent<EventTarget>

createEvent("PromiseRejectionEvent")

function createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent

Parámetros

eventInterface

"PromiseRejectionEvent"

Devoluciones

PromiseRejectionEvent

createEvent("RTCDataChannelEvent")

function createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent

Parámetros

eventInterface

"RTCDataChannelEvent"

Devoluciones

RTCDataChannelEvent

createEvent("RTCDTMFToneChangeEvent")

function createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent

Parámetros

eventInterface

"RTCDTMFToneChangeEvent"

Devoluciones

RTCDTMFToneChangeEvent

createEvent("RTCErrorEvent")

function createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent

Parámetros

eventInterface

"RTCErrorEvent"

Devoluciones

RTCErrorEvent

createEvent("RTCPeerConnectionIceErrorEvent")

function createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent

Parámetros

eventInterface

"RTCPeerConnectionIceErrorEvent"

Devoluciones

RTCPeerConnectionIceErrorEvent

createEvent("RTCPeerConnectionIceEvent")

function createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent

Parámetros

eventInterface

"RTCPeerConnectionIceEvent"

Devoluciones

RTCPeerConnectionIceEvent

createEvent("RTCTrackEvent")

function createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent

Parámetros

eventInterface

"RTCTrackEvent"

Devoluciones

RTCTrackEvent

createEvent("SecurityPolicyViolationEvent")

function createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent

Parámetros

eventInterface

"SecurityPolicyViolationEvent"

Devoluciones

SecurityPolicyViolationEvent

createEvent("SpeechSynthesisErrorEvent")

function createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent

Parámetros

eventInterface

"SpeechSynthesisErrorEvent"

Devoluciones

SpeechSynthesisErrorEvent

createEvent("SpeechSynthesisEvent")

function createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent

Parámetros

eventInterface

"SpeechSynthesisEvent"

Devoluciones

SpeechSynthesisEvent

createEvent("StorageEvent")

function createEvent(eventInterface: "StorageEvent"): StorageEvent

Parámetros

eventInterface

"StorageEvent"

Devoluciones

StorageEvent

createEvent("SubmitEvent")

function createEvent(eventInterface: "SubmitEvent"): SubmitEvent

Parámetros

eventInterface

"SubmitEvent"

Devoluciones

SubmitEvent

createEvent("TouchEvent")

function createEvent(eventInterface: "TouchEvent"): TouchEvent

Parámetros

eventInterface

"TouchEvent"

Devoluciones

TouchEvent

createEvent("TrackEvent")

function createEvent(eventInterface: "TrackEvent"): TrackEvent

Parámetros

eventInterface

"TrackEvent"

Devoluciones

TrackEvent

createEvent("TransitionEvent")

function createEvent(eventInterface: "TransitionEvent"): TransitionEvent

Parámetros

eventInterface

"TransitionEvent"

Devoluciones

TransitionEvent

createEvent("UIEvent")

function createEvent(eventInterface: "UIEvent"): UIEvent

Parámetros

eventInterface

"UIEvent"

Devoluciones

UIEvent

createEvent("UIEvents")

function createEvent(eventInterface: "UIEvents"): UIEvent

Parámetros

eventInterface

"UIEvents"

Devoluciones

UIEvent

createEvent("WebGLContextEvent")

function createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent

Parámetros

eventInterface

"WebGLContextEvent"

Devoluciones

WebGLContextEvent

createEvent("WheelEvent")

function createEvent(eventInterface: "WheelEvent"): WheelEvent

Parámetros

eventInterface

"WheelEvent"

Devoluciones

WheelEvent

createEvent(string)

function createEvent(eventInterface: string): Event

Parámetros

eventInterface

string

Devoluciones

Event

createNodeIterator(Node, number, null | NodeFilter)

Crea un objeto NodeIterator que puede usar para recorrer listas filtradas de nodos o elementos de un documento.

function createNodeIterator(root: Node, whatToShow?: number, filter?: null | NodeFilter): NodeIterator

Parámetros

root

Node

Elemento raíz o nodo en el que se va a iniciar el recorrido.

whatToShow

number

Tipo de nodos o elementos que se van a aparecer en la lista de nodos

filter

null | NodeFilter

Función NodeFilter personalizada que se va a usar. Para obtener más información, consulte filtro. Use null para ningún filtro.

Devoluciones

NodeIterator

createProcessingInstruction(string, string)

Devuelve un nodo ProcessingInstruction cuyo destino es el destino y los datos son datos. Si el destino no coincide con name production, se producirá una excepción DOMException "InvalidCharacterError". Si los datos contienen "?>" se producirá una excepción DOMException "InvalidCharacterError".

function createProcessingInstruction(target: string, data: string): ProcessingInstruction

Parámetros

target

string

data

string

Devoluciones

ProcessingInstruction

createRange()

Devuelve un objeto de intervalo vacío que tiene ambos puntos de límite colocados al principio del documento.

function createRange(): Range

Devoluciones

Range

createTextNode(string)

Crea una cadena de texto a partir del valor especificado.

function createTextNode(data: string): Text

Parámetros

data

string

Cadena que especifica la propiedad nodeValue del nodo de texto.

Devoluciones

Text

createTreeWalker(Node, number, null | NodeFilter)

Crea un objeto TreeWalker que puede usar para recorrer listas filtradas de nodos o elementos de un documento.

function createTreeWalker(root: Node, whatToShow?: number, filter?: null | NodeFilter): TreeWalker

Parámetros

root

Node

Elemento raíz o nodo en el que se va a iniciar el recorrido.

whatToShow

number

Tipo de nodos o elementos que se van a aparecer en la lista de nodos. Para obtener más información, vea whatToShow.

filter

null | NodeFilter

Función NodeFilter personalizada que se va a usar.

Devoluciones

TreeWalker

execCommand(string, boolean, string)

Advertencia

Esta API ya está en desuso.

Ejecuta un comando en el documento actual, la selección actual o el intervalo especificado.

function execCommand(commandId: string, showUI?: boolean, value?: string): boolean

Parámetros

commandId

string

Cadena que especifica el comando que se va a ejecutar. Este comando puede ser cualquiera de los identificadores de comando que se pueden ejecutar en el script.

showUI

boolean

Muestra la interfaz de usuario, el valor predeterminado es false.

value

string

Valor que se va a asignar.

Devoluciones

boolean

exitFullscreen()

Impide que el elemento de pantalla completa del documento se muestre en pantalla completa y resuelva la promesa cuando haya terminado.

function exitFullscreen(): Promise<void>

Devoluciones

Promise<void>

exitPictureInPicture()

function exitPictureInPicture(): Promise<void>

Devoluciones

Promise<void>

exitPointerLock()

function exitPointerLock()

getElementById(string)

Devuelve una referencia al primer objeto con el valor especificado del atributo ID.

function getElementById(elementId: string): null | HTMLElement

Parámetros

elementId

string

Cadena que especifica el valor de identificador.

Devoluciones

null | HTMLElement

getElementsByClassName(string)

Devuelve un HTMLCollection de los elementos del objeto en el que se invocó el método (un documento o un elemento) que tienen todas las clases dadas por classNames. El argumento classNames se interpreta como una lista separada por espacios de clases.

function getElementsByClassName(classNames: string): HTMLCollectionOf<Element>

Parámetros

classNames

string

Devoluciones

HTMLCollectionOf<Element>

getElementsByName(string)

Obtiene una colección de objetos basándose en el valor del atributo NAME o ID.

function getElementsByName(elementName: string): NodeListOf<HTMLElement>

Parámetros

elementName

string

Obtiene una colección de objetos basándose en el valor del atributo NAME o ID.

Devoluciones

NodeListOf<HTMLElement>

getElementsByTagName(string)

function getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>

Parámetros

qualifiedName

string

Devoluciones

HTMLCollectionOf<Element>

getElementsByTagName<K>(K)

Recupera una colección de objetos basándose en el nombre de elemento especificado.

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>

Parámetros

qualifiedName

K

Devoluciones

HTMLCollectionOf<HTMLElementTagNameMap[K]>

getElementsByTagName<K>(K)

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>

Parámetros

qualifiedName

K

Devoluciones

HTMLCollectionOf<SVGElementTagNameMap[K]>

getElementsByTagNameNS("http://www.w3.org/1999/xhtml", string)

Si el espacio de nombres y localName son "*" devuelve una htmlCollection de todos los elementos descendientes.

Si solo el espacio de nombres es "*" devuelve una htmlCollection de todos los elementos descendientes cuyo nombre local es localName.

Si solo localName es "*" devuelve una htmlCollection de todos los elementos descendientes cuyo espacio de nombres es espacio de nombres.

De lo contrario, devuelve un HTMLCollection de todos los elementos descendientes cuyo espacio de nombres es espacio de nombres y el nombre local es localName.

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>

Parámetros

namespaceURI

"http://www.w3.org/1999/xhtml"

localName

string

Devoluciones

HTMLCollectionOf<HTMLElement>

getElementsByTagNameNS("http://www.w3.org/2000/svg", string)

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>

Parámetros

namespaceURI

"http://www.w3.org/2000/svg"

localName

string

Devoluciones

HTMLCollectionOf<SVGElement>

getElementsByTagNameNS(null | string, string)

function getElementsByTagNameNS(namespace: null | string, localName: string): HTMLCollectionOf<Element>

Parámetros

namespace

null | string

localName

string

Devoluciones

HTMLCollectionOf<Element>

getSelection()

Devuelve un objeto que representa la selección actual del documento que se carga en el objeto que muestra una página web.

function getSelection(): null | Selection

Devoluciones

null | Selection

hasFocus()

Obtiene un valor que indica si el objeto tiene el foco actualmente.

function hasFocus(): boolean

Devoluciones

boolean

hasStorageAccess()

function hasStorageAccess(): Promise<boolean>

Devoluciones

Promise<boolean>

importNode<T>(T, boolean)

Devuelve una copia del nodo. Si deep es true, la copia también incluye los descendientes del nodo.

Si el nodo es un documento o una raíz de sombra, produce una excepción DOMException "NotSupportedError".

function importNode<T>(node: T, deep?: boolean): T

Parámetros

node

T

deep

boolean

Devoluciones

T

open(string | URL, string, string)

function open(url: string | URL, name: string, features: string): null | Window

Parámetros

url

string | URL

name

string

features

string

Devoluciones

null | Window

open(string, string)

Abre una nueva ventana y carga un documento especificado por una dirección URL determinada. Además, abre una nueva ventana que usa el parámetro url y el parámetro name para recopilar la salida del método de escritura y el método writeln.

function open(unused1?: string, unused2?: string): Document

Parámetros

unused1

string

unused2

string

Devoluciones

Document

queryCommandEnabled(string)

Advertencia

Esta API ya está en desuso.

Devuelve un valor booleano que indica si un comando especificado se puede ejecutar correctamente mediante execCommand, dado el estado actual del documento.

function queryCommandEnabled(commandId: string): boolean

Parámetros

commandId

string

Especifica un identificador de comando.

Devoluciones

boolean

queryCommandIndeterm(string)

Advertencia

Esta API ya está en desuso.

Devuelve un valor booleano que indica si el comando especificado está en estado indeterminado.

function queryCommandIndeterm(commandId: string): boolean

Parámetros

commandId

string

Cadena que especifica un identificador de comando.

Devoluciones

boolean

queryCommandState(string)

Advertencia

Esta API ya está en desuso.

Devuelve un valor booleano que indica el estado actual del comando.

function queryCommandState(commandId: string): boolean

Parámetros

commandId

string

Cadena que especifica un identificador de comando.

Devoluciones

boolean

queryCommandSupported(string)

Advertencia

Esta API ya está en desuso.

Devuelve un valor booleano que indica si el comando actual se admite en el intervalo actual.

function queryCommandSupported(commandId: string): boolean

Parámetros

commandId

string

Especifica un identificador de comando.

Devoluciones

boolean

queryCommandValue(string)

Advertencia

Esta API ya está en desuso.

Devuelve el valor actual del documento, el intervalo o la selección actual del comando especificado.

function queryCommandValue(commandId: string): string

Parámetros

commandId

string

Cadena que especifica un identificador de comando.

Devoluciones

string

releaseEvents()

Advertencia

Esta API ya está en desuso.

function releaseEvents()

removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)

function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions)

Parámetros

type

string

listener

EventListenerOrEventListenerObject

options

boolean | EventListenerOptions

removeEventListener<K>(K, (this: Document, ev: DocumentEventMap[K]) => any, boolean | EventListenerOptions)

function removeEventListener<K>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions)

Parámetros

type

K

listener

(this: Document, ev: DocumentEventMap[K]) => any

options

boolean | EventListenerOptions

requestStorageAccess()

function requestStorageAccess(): Promise<void>

Devoluciones

Promise<void>

write(string[])

Escribe una o varias expresiones HTML en un documento en la ventana especificada.

function write(text: string[])

Parámetros

text

string[]

writeln(string[])

Escribe una o varias expresiones HTML, seguidas de un retorno de carro, en un documento de la ventana especificada.

function writeln(text: string[])

Parámetros

text

string[]

Detalles de los métodos heredados

append((string | Node)[])

Inserta nodos después del último elemento secundario del nodo, al tiempo que reemplaza las cadenas de los nodos por nodos de texto equivalentes.

Produce una excepción DOMException "HierarchyRequestError" si se infringen las restricciones del árbol de nodos.

function append(nodes: (string | Node)[])

Parámetros

nodes

(string | Node)[]

heredado de ParentNode.append

appendChild<T>(T)

function appendChild<T>(node: T): T

Parámetros

node

T

Devoluciones

T

Heredado de Node.appendChild

cloneNode(boolean)

Devuelve una copia del nodo. Si deep es true, la copia también incluye los descendientes del nodo.

function cloneNode(deep?: boolean): Node

Parámetros

deep

boolean

Devoluciones

Node

Heredado de Node.cloneNode

compareDocumentPosition(Node)

Devuelve una máscara de bits que indica la posición de otro relativo al nodo.

function compareDocumentPosition(other: Node): number

Parámetros

other

Node

Devoluciones

number

Heredado de Node.compareDocumentPosition

contains(null | Node)

Devuelve true si otro es un descendiente inclusivo del nodo y false en caso contrario.

function contains(other: null | Node): boolean

Parámetros

other

null | Node

Devoluciones

boolean

Heredar de Node.contains

createExpression(string, null | XPathNSResolver)

function createExpression(expression: string, resolver?: null | XPathNSResolver): XPathExpression

Parámetros

expression

string

resolver

null | XPathNSResolver

Devoluciones

XPathExpression

heredado de XPathEvaluatorBase.createExpression

createNSResolver(Node)

function createNSResolver(nodeResolver: Node): XPathNSResolver

Parámetros

nodeResolver

Node

Devoluciones

XPathNSResolver

heredado de XPathEvaluatorBase.createNSResolver

dispatchEvent(Event)

Envía un evento de evento sintético al destino y devuelve true si el valor de atributo cancelable del evento es false o su método preventDefault() no se invocó y false en caso contrario.

function dispatchEvent(event: Event): boolean

Parámetros

event

Event

Devoluciones

boolean

Heredado de Node.dispatchEvent

elementFromPoint(number, number)

Devuelve el elemento de la coordenada x especificada y la coordenada y especificada.

function elementFromPoint(x: number, y: number): null | Element

Parámetros

x

number

Desplazamiento x

y

number

Desplazamiento y

Devoluciones

null | Element

Heredado de DocumentOrShadowRoot.elementFromPoint

elementsFromPoint(number, number)

function elementsFromPoint(x: number, y: number): Element[]

Parámetros

x

number

y

number

Devoluciones

Element[]

Heredado de DocumentOrShadowRoot.elementsFromPoint

evaluate(string, Node, null | XPathNSResolver, number, null | XPathResult)

function evaluate(expression: string, contextNode: Node, resolver?: null | XPathNSResolver, type?: number, result?: null | XPathResult): XPathResult

Parámetros

expression

string

contextNode

Node

resolver

null | XPathNSResolver

type

number

result

null | XPathResult

Devoluciones

XPathResult

Heredado de XPathEvaluatorBase.evaluate

getAnimations()

function getAnimations(): Animation[]

Devoluciones

Animation[]

Heredado de DocumentOrShadowRoot.getAnimations

getRootNode(GetRootNodeOptions)

Devuelve la raíz del nodo.

function getRootNode(options?: GetRootNodeOptions): Node

Parámetros

options

GetRootNodeOptions

Devoluciones

Node

Heredado de Node.getRootNode

hasChildNodes()

Devuelve si el nodo tiene elementos secundarios.

function hasChildNodes(): boolean

Devoluciones

boolean

Heredado de Node.hasChildNodes

insertBefore<T>(T, null | Node)

function insertBefore<T>(node: T, child: null | Node): T

Parámetros

node

T

child

null | Node

Devoluciones

T

Heredado de Node.insertBefore

isDefaultNamespace(null | string)

function isDefaultNamespace(namespace: null | string): boolean

Parámetros

namespace

null | string

Devoluciones

boolean

Heredado de Node.isDefaultNamespace

isEqualNode(null | Node)

Devuelve si node y otherNode tienen las mismas propiedades.

function isEqualNode(otherNode: null | Node): boolean

Parámetros

otherNode

null | Node

Devoluciones

boolean

Heredado de Node.isEqualNode

isSameNode(null | Node)

function isSameNode(otherNode: null | Node): boolean

Parámetros

otherNode

null | Node

Devoluciones

boolean

Heredado de Node.isSameNode

lookupNamespaceURI(null | string)

function lookupNamespaceURI(prefix: null | string): null | string

Parámetros

prefix

null | string

Devoluciones

null | string

heredado de Node.lookupNamespaceURI

lookupPrefix(null | string)

function lookupPrefix(namespace: null | string): null | string

Parámetros

namespace

null | string

Devoluciones

null | string

Heredado de Node.lookupPrefix

normalize()

Quita nodos de texto exclusivos vacíos y concatena los datos de los nodos Text exclusivos contiguos restantes en el primero de sus nodos.

function normalize()

heredado de Node.normalize

prepend((string | Node)[])

Inserta nodos antes del primer elemento secundario del nodo, al tiempo que reemplaza las cadenas de los nodos por nodos de texto equivalentes.

Produce una excepción DOMException "HierarchyRequestError" si se infringen las restricciones del árbol de nodos.

function prepend(nodes: (string | Node)[])

Parámetros

nodes

(string | Node)[]

heredado de ParentNode.prepend

querySelector<E>(string)

function querySelector<E>(selectors: string): null | E

Parámetros

selectors

string

Devoluciones

null | E

Heredado de ParentNode.querySelector

querySelector<K>(K)

Devuelve el primer elemento que es un descendiente del nodo que coincide con los selectores.

function querySelector<K>(selectors: K): null | HTMLElementTagNameMap[K]

Parámetros

selectors

K

Devoluciones

null | HTMLElementTagNameMap[K]

Heredado de ParentNode.querySelector

querySelector<K>(K)

function querySelector<K>(selectors: K): null | SVGElementTagNameMap[K]

Parámetros

selectors

K

Devoluciones

null | SVGElementTagNameMap[K]

Heredado de ParentNode.querySelector

querySelectorAll<E>(string)

function querySelectorAll<E>(selectors: string): NodeListOf<E>

Parámetros

selectors

string

Devoluciones

NodeListOf<E>

Heredado de ParentNode.querySelectorAll

querySelectorAll<K>(K)

Devuelve todos los descendientes de elementos del nodo que coinciden con los selectores.

function querySelectorAll<K>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>

Parámetros

selectors

K

Devoluciones

NodeListOf<HTMLElementTagNameMap[K]>

Heredado de ParentNode.querySelectorAll

querySelectorAll<K>(K)

function querySelectorAll<K>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>

Parámetros

selectors

K

Devoluciones

NodeListOf<SVGElementTagNameMap[K]>

Heredado de ParentNode.querySelectorAll

removeChild<T>(T)

function removeChild<T>(child: T): T

Parámetros

child

T

Devoluciones

T

Heredado de Node.removeChild

replaceChild<T>(Node, T)

function replaceChild<T>(node: Node, child: T): T

Parámetros

node

Node

child

T

Devoluciones

T

Heredado de Node.replaceChild

replaceChildren((string | Node)[])

Reemplace todos los elementos secundarios del nodo por nodos, al tiempo que reemplaza las cadenas de los nodos por nodos de texto equivalentes.

Produce una excepción DOMException "HierarchyRequestError" si se infringen las restricciones del árbol de nodos.

function replaceChildren(nodes: (string | Node)[])

Parámetros

nodes

(string | Node)[]

Heredado de ParentNode.replaceChildren