Compartir a través de


Window interface

Ventana que contiene un documento DOM; la propiedad document apunta al documento DOM cargado en esa ventana.

Extends

EventTarget,AnimationFrameProvider,GlobalEventHandlers,WindowEventHandlers,WindowLocalStorage,WindowOrWorkerGlobalScope,WindowSessionStorage

Propiedades

clientInformation
closed

Devuelve true si se ha cerrado la ventana; de lo contrario, false.

customElements

Define un nuevo elemento personalizado, asignando el nombre dado al constructor dado como un elemento personalizado autónomo.

devicePixelRatio
document
event
external
frameElement
frames
history
innerHeight
innerWidth
length
location
locationbar

Devuelve true si la barra de ubicación está visible; de lo contrario, devuelve false.

menubar

Devuelve true si la barra de menús está visible; de lo contrario, devuelve false.

msCrypto
name
navigator
ondevicemotion

Solo está disponible en contextos seguros.

ondeviceorientation

Solo está disponible en contextos seguros.

onorientationchange
opener
orientation
outerHeight
outerWidth
pageXOffset
pageYOffset
parent

Hace referencia a WindowProxy primario o a sí mismo.

Rara vez puede ser null, por ejemplo, para contentWindow de un iframe que ya se ha quitado del elemento primario.

personalbar

Devuelve true si la barra personal está visible; de lo contrario, devuelve false.

powerbi
powerBISDKGlobalServiceInstanceName
screen
screenLeft
screenTop
screenX
screenY
scrollbars

Devuelve true si las barras de desplazamiento están visibles; de lo contrario, devuelve false.

scrollX
scrollY
self
speechSynthesis
status
statusbar

Devuelve true si la barra de estado está visible; de lo contrario, devuelve false.

toolbar

Devuelve true si la barra de herramientas está visible; de lo contrario, devuelve false.

top
visualViewport
window

Propiedades heredadas

caches

Solo está disponible en contextos seguros.

crossOriginIsolated
crypto
indexedDB
isSecureContext
localStorage
onabort

Se desencadena cuando el usuario anula la descarga.

onafterprint
onanimationcancel
onanimationend
onanimationiteration
onanimationstart
onauxclick
onbeforeinput
onbeforeprint
onbeforeunload
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.

oncuechange
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
ongamepadconnected
ongamepaddisconnected
ongotpointercapture
onhashchange
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.

onlanguagechange
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
onmessage
onmessageerror
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.

onoffline
ononline
onpagehide
onpageshow
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
onpopstate
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.

onrejectionhandled
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.

onstorage
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
onunhandledrejection
onunload
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
origin
performance
sessionStorage

Métodos

addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)
addEventListener<K>(K, (this: Window, ev: WindowEventMap[K]) => any, boolean | AddEventListenerOptions)
alert(any)
blur()
cancelIdleCallback(number)
captureEvents()
close()

Cierra la ventana.

confirm(string)
focus()

Mueve el foco al contexto de exploración de la ventana, si existe.

getComputedStyle(Element, null | string)
getSelection()
matchMedia(string)
moveBy(number, number)
moveTo(number, number)
open(string | URL, string, string)
postMessage(any, string, Transferable[])

Envía un mensaje a la ventana especificada. Los mensajes pueden ser objetos estructurados, por ejemplo, objetos anidados y matrices, pueden contener valores de JavaScript (cadenas, números, objetos Date, etc.) y pueden contener determinados objetos de datos como Archivos Blob, FileList y ArrayBuffer.

Los objetos enumerados en el miembro de transferencia de opciones se transfieren, no solo clonados, lo que significa que ya no se pueden usar en el lado de envío.

Se puede especificar un origen de destino mediante el miembro targetOrigin de opciones. Si no se proporciona, el valor predeterminado es "/". Este valor predeterminado restringe el mensaje solo a destinos de mismo origen.

Si el origen de la ventana de destino no coincide con el origen de destino especificado, se descarta el mensaje para evitar la pérdida de información. Para enviar el mensaje al destino independientemente del origen, establezca el origen de destino en "*".

Produce una excepción DOMException "DataCloneError" si la matriz de transferencia contiene objetos duplicados o si no se pudo clonar el mensaje.

postMessage(any, WindowPostMessageOptions)
print()
prompt(string, string)
releaseEvents()
removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)
removeEventListener<K>(K, (this: Window, ev: WindowEventMap[K]) => any, boolean | EventListenerOptions)
requestIdleCallback(IdleRequestCallback, IdleRequestOptions)
resizeBy(number, number)
resizeTo(number, number)
scroll(number, number)
scroll(ScrollToOptions)
scrollBy(number, number)
scrollBy(ScrollToOptions)
scrollTo(number, number)
scrollTo(ScrollToOptions)
stop()

Cancela la carga del documento.

Métodos heredados

atob(string)
btoa(string)
cancelAnimationFrame(number)
clearInterval(undefined | number)
clearTimeout(undefined | number)
createImageBitmap(ImageBitmapSource, ImageBitmapOptions)
createImageBitmap(ImageBitmapSource, number, number, number, number, ImageBitmapOptions)
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.

fetch(URL | RequestInfo, RequestInit)
queueMicrotask(VoidFunction)
reportError(any)
requestAnimationFrame(FrameRequestCallback)
setInterval(TimerHandler, number, any[])
setTimeout(TimerHandler, number, any[])
structuredClone(any, StructuredSerializeOptions)

Detalles de las propiedades

clientInformation

Advertencia

Esta API ya está en desuso.

This is a legacy alias of navigator.

clientInformation: Navigator

Valor de propiedad

Navigator

closed

Devuelve true si se ha cerrado la ventana; de lo contrario, false.

closed: boolean

Valor de propiedad

boolean

customElements

Define un nuevo elemento personalizado, asignando el nombre dado al constructor dado como un elemento personalizado autónomo.

customElements: CustomElementRegistry

Valor de propiedad

CustomElementRegistry

devicePixelRatio

devicePixelRatio: number

Valor de propiedad

number

document

document: Document

Valor de propiedad

Document

event

Advertencia

Esta API ya está en desuso.

event: undefined | Event

Valor de propiedad

undefined | Event

external

Advertencia

Esta API ya está en desuso.

external: External

Valor de propiedad

External

frameElement

frameElement: null | Element

Valor de propiedad

null | Element

frames

frames: Window

Valor de propiedad

Window

history

history: History

Valor de propiedad

History

innerHeight

innerHeight: number

Valor de propiedad

number

innerWidth

innerWidth: number

Valor de propiedad

number

length

length: number

Valor de propiedad

number

location

Location location

Valor de propiedad

Location

locationbar

Devuelve true si la barra de ubicación está visible; de lo contrario, devuelve false.

locationbar: BarProp

Valor de propiedad

BarProp

menubar

Devuelve true si la barra de menús está visible; de lo contrario, devuelve false.

menubar: BarProp

Valor de propiedad

BarProp

msCrypto

msCrypto: Crypto

Valor de propiedad

Crypto

name

name: string

Valor de propiedad

string

navigator

navigator: Navigator

Valor de propiedad

Navigator

ondevicemotion

Solo está disponible en contextos seguros.

ondevicemotion: null | (this: Window, ev: DeviceMotionEvent) => any

Valor de propiedad

null | (this: Window, ev: DeviceMotionEvent) => any

ondeviceorientation

Solo está disponible en contextos seguros.

ondeviceorientation: null | (this: Window, ev: DeviceOrientationEvent) => any

Valor de propiedad

null | (this: Window, ev: DeviceOrientationEvent) => any

onorientationchange

Advertencia

Esta API ya está en desuso.

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

Valor de propiedad

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

opener

opener: any

Valor de propiedad

any

orientation

Advertencia

Esta API ya está en desuso.

orientation: number

Valor de propiedad

number

outerHeight

outerHeight: number

Valor de propiedad

number

outerWidth

outerWidth: number

Valor de propiedad

number

pageXOffset

Advertencia

Esta API ya está en desuso.

This is a legacy alias of scrollX.

pageXOffset: number

Valor de propiedad

number

pageYOffset

Advertencia

Esta API ya está en desuso.

This is a legacy alias of scrollY.

pageYOffset: number

Valor de propiedad

number

parent

Hace referencia a WindowProxy primario o a sí mismo.

Rara vez puede ser null, por ejemplo, para contentWindow de un iframe que ya se ha quitado del elemento primario.

parent: Window

Valor de propiedad

Window

personalbar

Devuelve true si la barra personal está visible; de lo contrario, devuelve false.

personalbar: BarProp

Valor de propiedad

BarProp

powerbi

powerbi: Service

Valor de propiedad

powerBISDKGlobalServiceInstanceName

powerBISDKGlobalServiceInstanceName?: string

Valor de propiedad

string

screen

screen: Screen

Valor de propiedad

Screen

screenLeft

screenLeft: number

Valor de propiedad

number

screenTop

screenTop: number

Valor de propiedad

number

screenX

screenX: number

Valor de propiedad

number

screenY

screenY: number

Valor de propiedad

number

scrollbars

Devuelve true si las barras de desplazamiento están visibles; de lo contrario, devuelve false.

scrollbars: BarProp

Valor de propiedad

BarProp

scrollX

scrollX: number

Valor de propiedad

number

scrollY

scrollY: number

Valor de propiedad

number

self

self: Window & typeof globalThis

Valor de propiedad

Window & typeof globalThis

speechSynthesis

speechSynthesis: SpeechSynthesis

Valor de propiedad

SpeechSynthesis

status

Advertencia

Esta API ya está en desuso.

status: string

Valor de propiedad

string

statusbar

Devuelve true si la barra de estado está visible; de lo contrario, devuelve false.

statusbar: BarProp

Valor de propiedad

BarProp

toolbar

Devuelve true si la barra de herramientas está visible; de lo contrario, devuelve false.

toolbar: BarProp

Valor de propiedad

BarProp

top

top: null | Window

Valor de propiedad

null | Window

visualViewport

visualViewport: null | VisualViewport

Valor de propiedad

null | VisualViewport

window

window: Window & typeof globalThis

Valor de propiedad

Window & typeof globalThis

Detalles de las propiedades heredadas

caches

Solo está disponible en contextos seguros.

caches: CacheStorage

Valor de propiedad

CacheStorage

heredado de WindowOrWorkerGlobalScope.caches

crossOriginIsolated

crossOriginIsolated: boolean

Valor de propiedad

boolean

Heredado de WindowOrWorkerGlobalScope.crossOriginIsolated

crypto

crypto: Crypto

Valor de propiedad

Crypto

heredado de WindowOrWorkerGlobalScope.crypto

indexedDB

indexedDB: IDBFactory

Valor de propiedad

IDBFactory

Heredado de WindowOrWorkerGlobalScope.indexedDB

isSecureContext

isSecureContext: boolean

Valor de propiedad

boolean

Se hereda de WindowOrWorkerGlobalScope.isSecureContext

localStorage

localStorage: Storage

Valor de propiedad

Storage

heredado de WindowLocalStorage.localStorage

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

onafterprint

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

Valor de propiedad

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

heredado de WindowEventHandlers.onafterprint

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

onbeforeprint

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

Valor de propiedad

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

heredado de WindowEventHandlers.onbeforeprint

onbeforeunload

onbeforeunload: null | (this: WindowEventHandlers, ev: BeforeUnloadEvent) => any

Valor de propiedad

null | (this: WindowEventHandlers, ev: BeforeUnloadEvent) => any

heredado de WindowEventHandlers.onbeforeunload

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

oncuechange

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

Valor de propiedad

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

Heredado de GlobalEventHandlers.oncuechange

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

ongamepadconnected

ongamepadconnected: null | (this: WindowEventHandlers, ev: GamepadEvent) => any

Valor de propiedad

null | (this: WindowEventHandlers, ev: GamepadEvent) => any

heredado de WindowEventHandlers.ongamepadconnected

ongamepaddisconnected

ongamepaddisconnected: null | (this: WindowEventHandlers, ev: GamepadEvent) => any

Valor de propiedad

null | (this: WindowEventHandlers, ev: GamepadEvent) => any

heredado de WindowEventHandlers.ongamepaddisconnected

ongotpointercapture

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

Valor de propiedad

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

Heredado de GlobalEventHandlers.ongotpointercapture

onhashchange

onhashchange: null | (this: WindowEventHandlers, ev: HashChangeEvent) => any

Valor de propiedad

null | (this: WindowEventHandlers, ev: HashChangeEvent) => any

heredado de WindowEventHandlers.onhashchange

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

onlanguagechange

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

Valor de propiedad

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

se hereda de WindowEventHandlers.onlanguagechange

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

onmessage

onmessage: null | (this: WindowEventHandlers, ev: MessageEvent<any>) => any

Valor de propiedad

null | (this: WindowEventHandlers, ev: MessageEvent<any>) => any

heredado de WindowEventHandlers.onmessage

onmessageerror

onmessageerror: null | (this: WindowEventHandlers, ev: MessageEvent<any>) => any

Valor de propiedad

null | (this: WindowEventHandlers, ev: MessageEvent<any>) => any

se hereda de WindowEventHandlers.onmessageerror

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

onoffline

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

Valor de propiedad

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

heredado de WindowEventHandlers.onoffline

ononline

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

Valor de propiedad

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

heredado de WindowEventHandlers.ononline

onpagehide

onpagehide: null | (this: WindowEventHandlers, ev: PageTransitionEvent) => any

Valor de propiedad

null | (this: WindowEventHandlers, ev: PageTransitionEvent) => any

se hereda de WindowEventHandlers.onpagehide

onpageshow

onpageshow: null | (this: WindowEventHandlers, ev: PageTransitionEvent) => any

Valor de propiedad

null | (this: WindowEventHandlers, ev: PageTransitionEvent) => any

heredado de WindowEventHandlers.onpageshow

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

onpopstate

onpopstate: null | (this: WindowEventHandlers, ev: PopStateEvent) => any

Valor de propiedad

null | (this: WindowEventHandlers, ev: PopStateEvent) => any

heredado de WindowEventHandlers.onpopstate

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

onrejectionhandled

onrejectionhandled: null | (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any

Valor de propiedad

null | (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any

heredado de WindowEventHandlers.onrejectionhandled

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

onstorage

onstorage: null | (this: WindowEventHandlers, ev: StorageEvent) => any

Valor de propiedad

null | (this: WindowEventHandlers, ev: StorageEvent) => any

heredado de WindowEventHandlers.onstorage

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

onunhandledrejection

onunhandledrejection: null | (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any

Valor de propiedad

null | (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any

se hereda de WindowEventHandlers.onunhandledrejection

onunload

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

Valor de propiedad

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

heredado de WindowEventHandlers.onunload

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

origin

origin: string

Valor de propiedad

string

Heredado de WindowOrWorkerGlobalScope.origin

performance

performance: Performance

Valor de propiedad

Performance

heredado de WindowOrWorkerGlobalScope.performance

sessionStorage

sessionStorage: Storage

Valor de propiedad

Storage

heredado de WindowSessionStorage.sessionStorage

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: Window, ev: WindowEventMap[K]) => any, boolean | AddEventListenerOptions)

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

Parámetros

type

K

listener

(this: Window, ev: WindowEventMap[K]) => any

options

boolean | AddEventListenerOptions

alert(any)

function alert(message?: any)

Parámetros

message

any

blur()

function blur()

cancelIdleCallback(number)

function cancelIdleCallback(handle: number)

Parámetros

handle

number

captureEvents()

Advertencia

Esta API ya está en desuso.

function captureEvents()

close()

Cierra la ventana.

function close()

confirm(string)

function confirm(message?: string): boolean

Parámetros

message

string

Devoluciones

boolean

focus()

Mueve el foco al contexto de exploración de la ventana, si existe.

function focus()

getComputedStyle(Element, null | string)

function getComputedStyle(elt: Element, pseudoElt?: null | string): CSSStyleDeclaration

Parámetros

elt

Element

pseudoElt

null | string

Devoluciones

CSSStyleDeclaration

getSelection()

function getSelection(): null | Selection

Devoluciones

null | Selection

matchMedia(string)

function matchMedia(query: string): MediaQueryList

Parámetros

query

string

Devoluciones

MediaQueryList

moveBy(number, number)

function moveBy(x: number, y: number)

Parámetros

x

number

y

number

moveTo(number, number)

function moveTo(x: number, y: number)

Parámetros

x

number

y

number

open(string | URL, string, string)

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

Parámetros

url

string | URL

target

string

features

string

Devoluciones

null | Window

postMessage(any, string, Transferable[])

Envía un mensaje a la ventana especificada. Los mensajes pueden ser objetos estructurados, por ejemplo, objetos anidados y matrices, pueden contener valores de JavaScript (cadenas, números, objetos Date, etc.) y pueden contener determinados objetos de datos como Archivos Blob, FileList y ArrayBuffer.

Los objetos enumerados en el miembro de transferencia de opciones se transfieren, no solo clonados, lo que significa que ya no se pueden usar en el lado de envío.

Se puede especificar un origen de destino mediante el miembro targetOrigin de opciones. Si no se proporciona, el valor predeterminado es "/". Este valor predeterminado restringe el mensaje solo a destinos de mismo origen.

Si el origen de la ventana de destino no coincide con el origen de destino especificado, se descarta el mensaje para evitar la pérdida de información. Para enviar el mensaje al destino independientemente del origen, establezca el origen de destino en "*".

Produce una excepción DOMException "DataCloneError" si la matriz de transferencia contiene objetos duplicados o si no se pudo clonar el mensaje.

function postMessage(message: any, targetOrigin: string, transfer?: Transferable[])

Parámetros

message

any

targetOrigin

string

transfer

Transferable[]

postMessage(any, WindowPostMessageOptions)

function postMessage(message: any, options?: WindowPostMessageOptions)

Parámetros

message

any

options

WindowPostMessageOptions

print()

function print()

prompt(string, string)

function prompt(message?: string, _default?: string): null | string

Parámetros

message

string

_default

string

Devoluciones

null | 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: Window, ev: WindowEventMap[K]) => any, boolean | EventListenerOptions)

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

Parámetros

type

K

listener

(this: Window, ev: WindowEventMap[K]) => any

options

boolean | EventListenerOptions

requestIdleCallback(IdleRequestCallback, IdleRequestOptions)

function requestIdleCallback(callback: IdleRequestCallback, options?: IdleRequestOptions): number

Parámetros

callback

IdleRequestCallback

options

IdleRequestOptions

Devoluciones

number

resizeBy(number, number)

function resizeBy(x: number, y: number)

Parámetros

x

number

y

number

resizeTo(number, number)

function resizeTo(width: number, height: number)

Parámetros

width

number

height

number

scroll(number, number)

function scroll(x: number, y: number)

Parámetros

x

number

y

number

scroll(ScrollToOptions)

function scroll(options?: ScrollToOptions)

Parámetros

options

ScrollToOptions

scrollBy(number, number)

function scrollBy(x: number, y: number)

Parámetros

x

number

y

number

scrollBy(ScrollToOptions)

function scrollBy(options?: ScrollToOptions)

Parámetros

options

ScrollToOptions

scrollTo(number, number)

function scrollTo(x: number, y: number)

Parámetros

x

number

y

number

scrollTo(ScrollToOptions)

function scrollTo(options?: ScrollToOptions)

Parámetros

options

ScrollToOptions

stop()

Cancela la carga del documento.

function stop()

Detalles de los métodos heredados

atob(string)

function atob(data: string): string

Parámetros

data

string

Devoluciones

string

heredado de WindowOrWorkerGlobalScope.atob

btoa(string)

function btoa(data: string): string

Parámetros

data

string

Devoluciones

string

heredado de WindowOrWorkerGlobalScope.btoa

cancelAnimationFrame(number)

function cancelAnimationFrame(handle: number)

Parámetros

handle

number

Heredado de AnimationFrameProvider.cancelAnimationFrame

clearInterval(undefined | number)

function clearInterval(id: undefined | number)

Parámetros

id

undefined | number

heredado de WindowOrWorkerGlobalScope.clearInterval

clearTimeout(undefined | number)

function clearTimeout(id: undefined | number)

Parámetros

id

undefined | number

heredado de WindowOrWorkerGlobalScope.clearTimeout

createImageBitmap(ImageBitmapSource, ImageBitmapOptions)

function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>

Parámetros

image

ImageBitmapSource

options

ImageBitmapOptions

Devoluciones

Promise<ImageBitmap>

Heredado de WindowOrWorkerGlobalScope.createImageBitmap

createImageBitmap(ImageBitmapSource, number, number, number, number, ImageBitmapOptions)

function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>

Parámetros

image

ImageBitmapSource

sx

number

sy

number

sw

number

sh

number

options

ImageBitmapOptions

Devoluciones

Promise<ImageBitmap>

Heredado de WindowOrWorkerGlobalScope.createImageBitmap

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 EventTarget.dispatchEvent

fetch(URL | RequestInfo, RequestInit)

function fetch(input: URL | RequestInfo, init?: RequestInit): Promise<Response>

Parámetros

input

URL | RequestInfo

init

RequestInit

Devoluciones

Promise<Response>

se hereda de WindowOrWorkerGlobalScope.fetch

queueMicrotask(VoidFunction)

function queueMicrotask(callback: VoidFunction)

Parámetros

callback

VoidFunction

heredado de WindowOrWorkerGlobalScope.queueMicrotask

reportError(any)

function reportError(e: any)

Parámetros

e

any

Se hereda de WindowOrWorkerGlobalScope.reportError

requestAnimationFrame(FrameRequestCallback)

function requestAnimationFrame(callback: FrameRequestCallback): number

Parámetros

callback

FrameRequestCallback

Devoluciones

number

Inherited From AnimationFrameProvider.requestAnimationFrame

setInterval(TimerHandler, number, any[])

function setInterval(handler: TimerHandler, timeout?: number, arguments: any[]): number

Parámetros

handler

TimerHandler

timeout

number

arguments

any[]

Devoluciones

number

Heredado de WindowOrWorkerGlobalScope.setInterval

setTimeout(TimerHandler, number, any[])

function setTimeout(handler: TimerHandler, timeout?: number, arguments: any[]): number

Parámetros

handler

TimerHandler

timeout

number

arguments

any[]

Devoluciones

number

Heredado de WindowOrWorkerGlobalScope.setTimeout

structuredClone(any, StructuredSerializeOptions)

function structuredClone(value: any, options?: StructuredSerializeOptions): any

Parámetros

value

any

options

StructuredSerializeOptions

Devoluciones

any

heredado de WindowOrWorkerGlobalScope.structuredClone