Window interface

介面 Window 代表一個包含 DOM 文件的視窗;屬性 document 指向該視窗載入的 DOM 文件。

MDN 參考

Extends

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

屬性

clientInformation
closed

Window.closed唯讀特性表示所參考視窗是否關閉。

MDN 參考

cookieStore

cookieStore視窗介面的唯讀特性會回傳目前文件上下文中 CookieStore 物件的參考。

MDN 參考

customElements

customElements視窗介面的唯讀屬性會回傳 CustomElementRegistry 物件的參考,該物件可用來註冊新的自訂元素並取得先前註冊的自訂元素資訊。

MDN 參考

devicePixelRatio

devicePixelRatio Window 介面會回傳目前顯示裝置的實體像素解析度與 CSS 像素解析度的比率。

MDN 參考

document

window.document 回傳視窗中文件的參考。

MDN 參考

event

唯讀視窗屬性 event 會回傳目前由網站程式碼處理的事件。

external

external Windows API 的屬性會回傳介面的實例,該實例External原本是用來包含與新增外部搜尋提供者相關的函式。

frameElement

該 Window.frameElement 屬性會回傳嵌入視窗的元素(例如 iframe 或物件)。

MDN 參考

frames

回傳視窗本身,這是一個陣列狀物件,列出目前視窗的直接子框架。

MDN 參考

history

唯讀屬性會 Window.history 回傳對 History 物件的參考,該物件提供操作瀏覽器 會話歷史 (即目前頁面載入分頁或框架中造訪的頁面)的介面。

MDN 參考

innerHeight

如果存在,則包含了水平捲動條的高度,該特性為唯讀 innerHeight 性質。

MDN 參考

innerWidth

唯讀視窗屬性 innerWidth 回傳視窗內部寬度(像素數),即視窗佈局視窗的寬度。

MDN 參考

length

回傳影格數(可選為影格或 A 編號)。

MDN 參考

location

唯讀屬性會 Window.location 回傳一個包含文件當前位置資訊的 Location 物件。

MDN 參考

locationbar

回傳物件 locationbar 。

MDN 參考

menubar

回傳物件 menubar 。

MDN 參考

msCrypto
name

這個 Window.name 屬性會取得/設定視窗的瀏覽上下文名稱。

MDN 參考

navigator

唯讀屬性會 Window.navigator 回傳一個 Navigator 物件的參考,該物件包含執行腳本應用程式的方法與屬性。

MDN 參考

ondevicemotion

僅適用於安全內容。

MDN 參考

ondeviceorientation

僅適用於安全內容。

MDN 參考

ondeviceorientationabsolute

僅適用於安全內容。

MDN 參考

onorientationchange
opener

視窗介面的屬性會 opener 回傳開啟該視窗的參考,可以使用 Window.open 或透過屬性 target 導航連結。

MDN 參考

orientation

以視窗相對於裝置自然方向的度數(90度遞增)回傳方向。

originAgentCluster

originAgentCluster如果視窗屬於源鍵代理叢集,則該視窗介面的唯讀特性會回傳true:這表示作業系統已為該視窗的起源提供專用資源(例如作業系統程序),這些資源並未與其他來源的視窗共享。

MDN 參考

outerHeight

Window.outerHeight唯讀屬性會回傳整個瀏覽器視窗的高度(像素),包括任何側邊欄、視窗 Chrome 以及視窗大小調整的邊框/把手。

MDN 參考

outerWidth

Window.outerWidth 唯讀屬性會回傳瀏覽器視窗外側的寬度。

MDN 參考

pageXOffset

MDN 參考

pageYOffset

MDN 參考

parent

該 Window.parent 屬性是對當前視窗或子框架父節點的參考。

MDN 參考

personalbar

回傳物件 personalbar 。

MDN 參考

powerbi
powerBISDKGlobalServiceInstanceName
screen

視窗屬性 screen 回傳與視窗相關聯的螢幕物件參考。

MDN 參考

screenLeft

Window.screenLeft唯讀特性會回傳從使用者瀏覽器視窗左側邊界到螢幕左側的水平距離(以 CSS 像素為單位)。

MDN 參考

screenTop

Window.screenTop唯讀特性回傳從使用者瀏覽器視口頂端邊界到螢幕上方的垂直距離(以 CSS 像素為單位)。

MDN 參考

screenX

Window.screenX唯讀特性回傳使用者瀏覽器視窗左側邊框到螢幕左側的水平距離(以 CSS 像素計)。

MDN 參考

screenY

Window.screenY唯讀特性會回傳使用者瀏覽器視窗頂端邊框到螢幕頂端的垂直距離(以 CSS 像素為單位)。

MDN 參考

scrollbars

回傳物件 scrollbars 。

MDN 參考

scrollX

視窗介面的唯讀 scrollX 特性會回傳文件目前橫向滾動的像素數。

MDN 參考

scrollY

視窗介面的唯讀 scrollY 特性會回傳文件目前垂直捲動的像素數。

MDN 參考

self

唯讀屬性會 Window.self 回傳視窗本身,作為 WindowProxy。

MDN 參考

speechSynthesis

speechSynthesis視窗物件的唯讀特性會回傳一個語音合成物件,這是使用 Web Speech API 語音合成功能的入口。

MDN 參考

status

瀏覽器 status 視窗底部的條狀屬性。

statusbar

回傳物件 statusbar 。

MDN 參考

toolbar

回傳物件 toolbar 。

MDN 參考

top

回傳視窗階層中最頂端視窗的參考。

MDN 參考

visualViewport

visualViewport視窗介面的唯讀屬性會回傳一個 VisualViewport 物件,代表該視窗的視覺視埠,或null當當前文件尚未完全啟用時。

MDN 參考

window

Window 物件的屬性指向 window 視窗物件本身。

MDN 參考

繼承的屬性

caches

僅適用於安全內容。

MDN 參考

crossOriginIsolated

MDN 參考

crypto

MDN 參考

indexedDB

MDN 參考

isSecureContext

MDN 參考

localStorage

MDN 參考

onabort

MDN 參考

onafterprint

MDN 參考

onanimationcancel

MDN 參考

onanimationend

MDN 參考

onanimationiteration

MDN 參考

onanimationstart

MDN 參考

onauxclick

MDN 參考

onbeforeinput

MDN 參考

onbeforematch

MDN 參考

onbeforeprint

MDN 參考

onbeforetoggle

MDN 參考

onbeforeunload

MDN 參考

onblur

MDN 參考

oncancel

MDN 參考

oncanplay

MDN 參考

oncanplaythrough

MDN 參考

onchange

MDN 參考

onclick

MDN 參考

onclose

MDN 參考

oncontextlost

MDN 參考

oncontextmenu

MDN 參考

oncontextrestored

MDN 參考

oncopy

MDN 參考

oncuechange

MDN 參考

oncut

MDN 參考

ondblclick

MDN 參考

ondrag

MDN 參考

ondragend

MDN 參考

ondragenter

MDN 參考

ondragleave

MDN 參考

ondragover

MDN 參考

ondragstart

MDN 參考

ondrop

MDN 參考

ondurationchange

MDN 參考

onemptied

MDN 參考

onended

MDN 參考

onerror

MDN 參考

onfocus

MDN 參考

onformdata

MDN 參考

ongamepadconnected

MDN 參考

ongamepaddisconnected

MDN 參考

ongotpointercapture

MDN 參考

onhashchange

MDN 參考

oninput

MDN 參考

oninvalid

MDN 參考

onkeydown

MDN 參考

onkeypress
onkeyup

MDN 參考

onlanguagechange

MDN 參考

onload

MDN 參考

onloadeddata

MDN 參考

onloadedmetadata

MDN 參考

onloadstart

MDN 參考

onlostpointercapture

MDN 參考

onmessage

MDN 參考

onmessageerror

MDN 參考

onmousedown

MDN 參考

onmouseenter

MDN 參考

onmouseleave

MDN 參考

onmousemove

MDN 參考

onmouseout

MDN 參考

onmouseover

MDN 參考

onmouseup

MDN 參考

onoffline

MDN 參考

ononline

MDN 參考

onpagehide

MDN 參考

onpagereveal

MDN 參考

onpageshow

MDN 參考

onpageswap

MDN 參考

onpaste

MDN 參考

onpause

MDN 參考

onplay

MDN 參考

onplaying

MDN 參考

onpointercancel

MDN 參考

onpointerdown

MDN 參考

onpointerenter

MDN 參考

onpointerleave

MDN 參考

onpointermove

MDN 參考

onpointerout

MDN 參考

onpointerover

MDN 參考

onpointerrawupdate

僅適用於安全內容。

MDN 參考

onpointerup

MDN 參考

onpopstate

MDN 參考

onprogress

MDN 參考

onratechange

MDN 參考

onrejectionhandled

MDN 參考

onreset

MDN 參考

onresize

MDN 參考

onscroll

MDN 參考

onscrollend

MDN 參考

onsecuritypolicyviolation

MDN 參考

onseeked

MDN 參考

onseeking

MDN 參考

onselect

MDN 參考

onselectionchange

MDN 參考

onselectstart

MDN 參考

onslotchange

MDN 參考

onstalled

MDN 參考

onstorage

MDN 參考

onsubmit

MDN 參考

onsuspend

MDN 參考

ontimeupdate

MDN 參考

ontoggle

MDN 參考

ontouchcancel

MDN 參考

ontouchend

MDN 參考

ontouchmove

MDN 參考

ontouchstart

MDN 參考

ontransitioncancel

MDN 參考

ontransitionend

MDN 參考

ontransitionrun

MDN 參考

ontransitionstart

MDN 參考

onunhandledrejection

MDN 參考

onunload
onvolumechange

MDN 參考

onwaiting

MDN 參考

onwebkitanimationend
onwebkitanimationiteration
onwebkitanimationstart
onwebkittransitionend
onwheel

MDN 參考

origin

MDN 參考

performance

MDN 參考

sessionStorage

MDN 參考

方法

addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)
addEventListener<K>(K, (this: Window, ev: WindowEventMap[K]) => any, boolean | AddEventListenerOptions)

addEventListener() EventTarget 介面的方法會設定一個函式,當指定事件交付給目標時會被呼叫。

MDN 參考

alert(any)

window.alert() 指示瀏覽器顯示帶有可選訊息的對話框,並等待使用者關閉該對話框。

MDN 參考

blur()

這個 Window.blur() 方法什麼都沒用。

cancelIdleCallback(number)

此 window.cancelIdleCallback() 方法會取消先前以 window.requestIdleCallback() 排程的回撥。

MDN 參考

captureEvents()

這個 Window.captureEvents() 方法什麼都沒用。

close()

此 Window.close() 方法會關閉目前的視窗,或是被呼叫的視窗。

MDN 參考

confirm(string)

window.confirm() 指示瀏覽器顯示帶有可選訊息的對話框,並等待使用者確認或取消該對話框。

MDN 參考

focus()

他提出要把窗戶移到前面。

MDN 參考

getComputedStyle(Element, string | null)

Window.getComputedStyle()該方法在套用主動樣式表並解決這些值可能包含的基本運算後,回傳一個包含元素所有 CSS 屬性值的物件。

MDN 參考

getSelection()

getSelection()視窗介面的方法會回傳與視窗文件相關的 Selection 物件,代表使用者所選擇的文字範圍或插入點目前的位置。

MDN 參考

matchMedia(string)

視窗介面的方法會 matchMedia() 回傳一個新的 MediaQueryList 物件,可用來判斷文件是否符合媒體查詢字串,並監控文件以偵測是否匹配(或停止匹配)該媒體查詢。

MDN 參考

moveBy(number, number)

moveBy()視窗介面的方法會將當前視窗移動指定幅度。

MDN 參考

moveTo(number, number)

moveTo()視窗介面的方法將當前視窗移動到指定的座標。

MDN 參考

open(string | URL, string, string)

介面的方法Window將open()指定的資源載入新的或現有的瀏覽情境(例如分頁、視窗或 iframe),並以指定名稱進行。

MDN 參考

postMessage(any, string, Transferable[])

此 window.postMessage() 方法能安全地實現視窗物件間的跨來源通訊; 例如,頁面 與其彈出視窗之間,或頁面與嵌入其中的 iframe 之間。

MDN 參考

postMessage(any, WindowPostMessageOptions)
print()

打開列印對話框以列印目前的文件。

MDN 參考

prompt(string, string)

window.prompt() 指示瀏覽器顯示對話框並附有可選訊息,提示使用者輸入文字,並等待使用者提交文字或取消對話框。

MDN 參考

releaseEvents()

解除視窗對特定類型事件的限制。

removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)
removeEventListener<K>(K, (this: Window, ev: WindowEventMap[K]) => any, boolean | EventListenerOptions)

removeEventListener() EventTarget 介面的方法會從目標中移除先前註冊於 EventTarget.addEventListener() 的事件監聽器。

MDN 參考

requestIdleCallback(IdleRequestCallback, IdleRequestOptions)

此 window.requestIdleCallback() 方法會在瀏覽器閒置期間排隊呼叫函式。

MDN 參考

resizeBy(number, number)

此 Window.resizeBy() 方法會將當前視窗調整指定大小。

MDN 參考

resizeTo(number, number)

此方法會 Window.resizeTo() 動態調整視窗大小。

MDN 參考

scroll(number, number)
scroll(ScrollToOptions)

此方法將 Window.scroll() 視窗捲動至文件中的特定位置。

MDN 參考

scrollBy(number, number)
scrollBy(ScrollToOptions)

該 Window.scrollBy() 方法會在視窗中依指定長度滾動文件。

MDN 參考

scrollTo(number, number)
scrollTo(ScrollToOptions)

Window.scrollTo() 捲動至文件中特定的座標集合。

MDN 參考

stop()

這些裝置 window.stop() 會停止在當前瀏覽情境中繼續載入資源,就像瀏覽器中的停止按鈕一樣。

MDN 參考

屬性詳細資料

clientInformation

警告

此 API 現已淘汰。

This is a legacy alias of navigator.

MDN Reference

clientInformation: Navigator

屬性值

Navigator

closed

Window.closed唯讀特性表示所參考視窗是否關閉。

MDN 參考

closed: boolean

屬性值

boolean

cookieStore

cookieStore視窗介面的唯讀特性會回傳目前文件上下文中 CookieStore 物件的參考。

MDN 參考

cookieStore: CookieStore

屬性值

CookieStore

customElements

customElements視窗介面的唯讀屬性會回傳 CustomElementRegistry 物件的參考,該物件可用來註冊新的自訂元素並取得先前註冊的自訂元素資訊。

MDN 參考

customElements: CustomElementRegistry

屬性值

CustomElementRegistry

devicePixelRatio

devicePixelRatio Window 介面會回傳目前顯示裝置的實體像素解析度與 CSS 像素解析度的比率。

MDN 參考

devicePixelRatio: number

屬性值

number

document

window.document 回傳視窗中文件的參考。

MDN 參考

document: Document

屬性值

event

警告

此 API 現已淘汰。

MDN Reference

唯讀視窗屬性 event 會回傳目前由網站程式碼處理的事件。

event: Event | undefined

屬性值

Event | undefined

external

警告

此 API 現已淘汰。

MDN Reference

external Windows API 的屬性會回傳介面的實例,該實例External原本是用來包含與新增外部搜尋提供者相關的函式。

external: External

屬性值

External

frameElement

該 Window.frameElement 屬性會回傳嵌入視窗的元素(例如 iframe 或物件)。

MDN 參考

frameElement: Element | null

屬性值

Element | null

frames

回傳視窗本身,這是一個陣列狀物件,列出目前視窗的直接子框架。

MDN 參考

frames: Window

屬性值

history

唯讀屬性會 Window.history 回傳對 History 物件的參考,該物件提供操作瀏覽器 會話歷史 (即目前頁面載入分頁或框架中造訪的頁面)的介面。

MDN 參考

history: History

屬性值

History

innerHeight

如果存在,則包含了水平捲動條的高度,該特性為唯讀 innerHeight 性質。

MDN 參考

innerHeight: number

屬性值

number

innerWidth

唯讀視窗屬性 innerWidth 回傳視窗內部寬度(像素數),即視窗佈局視窗的寬度。

MDN 參考

innerWidth: number

屬性值

number

length

回傳影格數(可選為影格或 A 編號)。

MDN 參考

length: number

屬性值

number

location

唯讀屬性會 Window.location 回傳一個包含文件當前位置資訊的 Location 物件。

MDN 參考

Location location

屬性值

Location

locationbar

回傳物件 locationbar 。

MDN 參考

locationbar: BarProp

屬性值

BarProp

menubar

回傳物件 menubar 。

MDN 參考

menubar: BarProp

屬性值

BarProp

msCrypto

msCrypto: Crypto

屬性值

Crypto

name

這個 Window.name 屬性會取得/設定視窗的瀏覽上下文名稱。

MDN 參考

name: string

屬性值

string

navigator

唯讀屬性會 Window.navigator 回傳一個 Navigator 物件的參考,該物件包含執行腳本應用程式的方法與屬性。

MDN 參考

navigator: Navigator

屬性值

Navigator

ondevicemotion

僅適用於安全內容。

MDN 參考

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

屬性值

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

ondeviceorientation

僅適用於安全內容。

MDN 參考

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

屬性值

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

ondeviceorientationabsolute

僅適用於安全內容。

MDN 參考

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

屬性值

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

onorientationchange

警告

此 API 現已淘汰。

MDN Reference

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

屬性值

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

opener

視窗介面的屬性會 opener 回傳開啟該視窗的參考,可以使用 Window.open 或透過屬性 target 導航連結。

MDN 參考

opener: any

屬性值

any

orientation

警告

此 API 現已淘汰。

MDN Reference

以視窗相對於裝置自然方向的度數(90度遞增)回傳方向。

orientation: number

屬性值

number

originAgentCluster

originAgentCluster如果視窗屬於源鍵代理叢集,則該視窗介面的唯讀特性會回傳true:這表示作業系統已為該視窗的起源提供專用資源(例如作業系統程序),這些資源並未與其他來源的視窗共享。

MDN 參考

originAgentCluster: boolean

屬性值

boolean

outerHeight

Window.outerHeight唯讀屬性會回傳整個瀏覽器視窗的高度(像素),包括任何側邊欄、視窗 Chrome 以及視窗大小調整的邊框/把手。

MDN 參考

outerHeight: number

屬性值

number

outerWidth

Window.outerWidth 唯讀屬性會回傳瀏覽器視窗外側的寬度。

MDN 參考

outerWidth: number

屬性值

number

pageXOffset

MDN 參考

pageXOffset: number

屬性值

number

pageYOffset

MDN 參考

pageYOffset: number

屬性值

number

parent

該 Window.parent 屬性是對當前視窗或子框架父節點的參考。

MDN 參考

parent: Window

屬性值

personalbar

回傳物件 personalbar 。

MDN 參考

personalbar: BarProp

屬性值

BarProp

powerbi

powerbi: Service

屬性值

powerBISDKGlobalServiceInstanceName

powerBISDKGlobalServiceInstanceName?: string

屬性值

string

screen

視窗屬性 screen 回傳與視窗相關聯的螢幕物件參考。

MDN 參考

screen: Screen

屬性值

Screen

screenLeft

Window.screenLeft唯讀特性會回傳從使用者瀏覽器視窗左側邊界到螢幕左側的水平距離(以 CSS 像素為單位)。

MDN 參考

screenLeft: number

屬性值

number

screenTop

Window.screenTop唯讀特性回傳從使用者瀏覽器視口頂端邊界到螢幕上方的垂直距離(以 CSS 像素為單位)。

MDN 參考

screenTop: number

屬性值

number

screenX

Window.screenX唯讀特性回傳使用者瀏覽器視窗左側邊框到螢幕左側的水平距離(以 CSS 像素計)。

MDN 參考

screenX: number

屬性值

number

screenY

Window.screenY唯讀特性會回傳使用者瀏覽器視窗頂端邊框到螢幕頂端的垂直距離(以 CSS 像素為單位)。

MDN 參考

screenY: number

屬性值

number

scrollbars

回傳物件 scrollbars 。

MDN 參考

scrollbars: BarProp

屬性值

BarProp

scrollX

視窗介面的唯讀 scrollX 特性會回傳文件目前橫向滾動的像素數。

MDN 參考

scrollX: number

屬性值

number

scrollY

視窗介面的唯讀 scrollY 特性會回傳文件目前垂直捲動的像素數。

MDN 參考

scrollY: number

屬性值

number

self

唯讀屬性會 Window.self 回傳視窗本身,作為 WindowProxy。

MDN 參考

self: Window & typeof globalThis

屬性值

Window & typeof globalThis

speechSynthesis

speechSynthesis視窗物件的唯讀特性會回傳一個語音合成物件,這是使用 Web Speech API 語音合成功能的入口。

MDN 參考

speechSynthesis: SpeechSynthesis

屬性值

SpeechSynthesis

status

警告

此 API 現已淘汰。

MDN Reference

瀏覽器 status 視窗底部的條狀屬性。

status: string

屬性值

string

statusbar

回傳物件 statusbar 。

MDN 參考

statusbar: BarProp

屬性值

BarProp

toolbar

回傳物件 toolbar 。

MDN 參考

toolbar: BarProp

屬性值

BarProp

top

回傳視窗階層中最頂端視窗的參考。

MDN 參考

top: Window | null

屬性值

Window | null

visualViewport

visualViewport視窗介面的唯讀屬性會回傳一個 VisualViewport 物件,代表該視窗的視覺視埠,或null當當前文件尚未完全啟用時。

MDN 參考

visualViewport: VisualViewport | null

屬性值

VisualViewport | null

window

Window 物件的屬性指向 window 視窗物件本身。

MDN 參考

window: Window & typeof globalThis

屬性值

Window & typeof globalThis

繼承的屬性詳細資料

caches

僅適用於安全內容。

MDN 參考

caches: CacheStorage

屬性值

CacheStorage

繼承自 WindowOrWorkerGlobalScope.caches

crossOriginIsolated

MDN 參考

crossOriginIsolated: boolean

屬性值

boolean

繼承自 WindowOrWorkerGlobalScope.crossOriginIsolated

crypto

MDN 參考

crypto: Crypto

屬性值

Crypto

繼承自 WindowOrWorkerGlobalScope.crypto

indexedDB

MDN 參考

indexedDB: IDBFactory

屬性值

IDBFactory

繼承自 WindowOrWorkerGlobalScope.indexedDB

isSecureContext

MDN 參考

isSecureContext: boolean

屬性值

boolean

繼承自 WindowOrWorkerGlobalScope.isSecureContext

localStorage

MDN 參考

localStorage: Storage

屬性值

Storage

繼承自 WindowLocalStorage.localStorage

onabort

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onabort

onafterprint

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onafterprint

onanimationcancel

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onanimationcancel

onanimationend

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onanimationend

onanimationiteration

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onanimationiteration

onanimationstart

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onanimationstart

onauxclick

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onauxclick

onbeforeinput

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onbeforeinput

onbeforematch

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onprematch

onbeforeprint

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onbeforeprint

onbeforetoggle

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onbeforetoggle

onbeforeunload

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onbeforeunload

onblur

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onblur

oncancel

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.oncancel

oncanplay

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.oncanplay

oncanplaythrough

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.oncanplaythrough

onchange

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onchange

onclick

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onclick

onclose

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onclose

oncontextlost

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.oncontextlost

oncontextmenu

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.oncontextmenu

oncontextrestored

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.oncontextrestored

oncopy

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.oncopy

oncuechange

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.oncuechange

oncut

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.oncut

ondblclick

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ondblclick

ondrag

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ondrag

ondragend

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ondragend

ondragenter

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ondragenter

ondragleave

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.ondragleave

ondragover

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ondragover

ondragstart

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ondragstart

ondrop

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.ondrop

ondurationchange

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ondurationchange

onemptied

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onemptied

onended

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onended

onerror

MDN 參考

onerror: OnErrorEventHandler

屬性值

OnErrorEventHandler

繼承自 GlobalEventHandlers.onerror

onfocus

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onfocus

onformdata

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onformdata

ongamepadconnected

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.ongamepadconnected

ongamepaddisconnected

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.ongamepaddisconnected

ongotpointercapture

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ongotpointercapture

onhashchange

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onhashchange

oninput

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.oninput

oninvalid

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.oninvalid

onkeydown

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onkeydown

onkeypress

警告

此 API 現已淘汰。

MDN Reference

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

屬性值

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

繼承自 globalEventHandlers.onkeypress

onkeyup

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onkeyup

onlanguagechange

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onlanguagechange

onload

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onload

onloadeddata

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onloadeddata

onloadedmetadata

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onloadedmetadata

onloadstart

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onloadstart

onlostpointercapture

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onlostpointercapture

onmessage

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onmessage

onmessageerror

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onmessageerror

onmousedown

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onmousedown

onmouseenter

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onmouseenter

onmouseleave

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onmouseleave

onmousemove

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onmousemove

onmouseout

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onmouseout

onmouseover

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onmouseover

onmouseup

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onmouseup

onoffline

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onoffline

ononline

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.ononline

onpagehide

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onpagehide

onpagereveal

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onpagereveal

onpageshow

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onpageshow

onpageswap

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onpageswap

onpaste

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onpaste

onpause

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onpause

onplay

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onplay

onplaying

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onplaying

onpointercancel

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onpointercancel

onpointerdown

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onpointerdown

onpointerenter

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onpointerenter

onpointerleave

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onpointerleave

onpointermove

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onpointermove

onpointerout

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onpointerout

onpointerover

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onpointerover

onpointerrawupdate

僅適用於安全內容。

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onpointerrawupdate

onpointerup

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onpointerup

onpopstate

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onpopstate

onprogress

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onprogress

onratechange

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onratechange

onrejectionhandled

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onrejectionhandled

onreset

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onreset

onresize

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onresize

onscroll

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onscroll

onscrollend

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onscrollend

onsecuritypolicyviolation

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onsecuritypolicyviolation

onseeked

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onseeked

onseeking

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onseeking

onselect

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onselect

onselectionchange

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onselectionchange

onselectstart

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onselectstart

onslotchange

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onslotchange

onstalled

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onstalled

onstorage

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onstorage

onsubmit

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onsubmit

onsuspend

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onsuspend

ontimeupdate

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ontimeupdate

ontoggle

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ontoggle

ontouchcancel

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ontouchcancel

ontouchend

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ontouchend

ontouchmove

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ontouchmove

ontouchstart

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ontouchstart

ontransitioncancel

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ontransitioncancel

ontransitionend

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ontransitionend

ontransitionrun

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ontransitionrun

ontransitionstart

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.ontransitionstart

onunhandledrejection

MDN 參考

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

屬性值

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

繼承自 WindowEventHandlers.onunhandledrejection

onunload

警告

此 API 現已淘汰。

MDN Reference

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

屬性值

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

繼承自 WindowEventHandlers.onunload

onvolumechange

MDN 參考

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

屬性值

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

繼承自 globalEventHandlers.onvolumechange

onwaiting

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onwaiting

onwebkitanimationend

警告

此 API 現已淘汰。

This is a legacy alias of onanimationend.

MDN Reference

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

屬性值

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

繼承自 globalEventHandlers.onwebkitanimationend

onwebkitanimationiteration

警告

此 API 現已淘汰。

This is a legacy alias of onanimationiteration.

MDN Reference

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

屬性值

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

繼承自 globalEventHandlers.onwebkitanimationiteration

onwebkitanimationstart

警告

此 API 現已淘汰。

This is a legacy alias of onanimationstart.

MDN Reference

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

屬性值

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

繼承自 GlobalEventHandlers.onwebkitanimationstart

onwebkittransitionend

警告

此 API 現已淘汰。

This is a legacy alias of ontransitionend.

MDN Reference

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

屬性值

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

繼承自 globalEventHandlers.onwebkittransitionend

onwheel

MDN 參考

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

屬性值

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

繼承自 GlobalEventHandlers.onwheel

origin

MDN 參考

origin: string

屬性值

string

繼承自 WindowOrWorkerGlobalScope.origin

performance

MDN 參考

performance: Performance

屬性值

Performance

繼承自 WindowOrWorkerGlobalScope.performance

sessionStorage

MDN 參考

sessionStorage: Storage

屬性值

Storage

繼承自 WindowSessionStorage.sessionStorage

方法詳細資料

addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)

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

參數

type

string

listener

EventListenerOrEventListenerObject

options

boolean | AddEventListenerOptions

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

addEventListener() EventTarget 介面的方法會設定一個函式,當指定事件交付給目標時會被呼叫。

MDN 參考

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

參數

type

K

listener

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

options

boolean | AddEventListenerOptions

alert(any)

window.alert() 指示瀏覽器顯示帶有可選訊息的對話框,並等待使用者關閉該對話框。

MDN 參考

function alert(message?: any)

參數

message

any

blur()

警告

此 API 現已淘汰。

MDN Reference

這個 Window.blur() 方法什麼都沒用。

function blur()

cancelIdleCallback(number)

此 window.cancelIdleCallback() 方法會取消先前以 window.requestIdleCallback() 排程的回撥。

MDN 參考

function cancelIdleCallback(handle: number)

參數

handle

number

captureEvents()

警告

此 API 現已淘汰。

MDN Reference

這個 Window.captureEvents() 方法什麼都沒用。

function captureEvents()

close()

此 Window.close() 方法會關閉目前的視窗,或是被呼叫的視窗。

MDN 參考

function close()

confirm(string)

window.confirm() 指示瀏覽器顯示帶有可選訊息的對話框,並等待使用者確認或取消該對話框。

MDN 參考

function confirm(message?: string): boolean

參數

message

string

傳回

boolean

focus()

他提出要把窗戶移到前面。

MDN 參考

function focus()

getComputedStyle(Element, string | null)

Window.getComputedStyle()該方法在套用主動樣式表並解決這些值可能包含的基本運算後,回傳一個包含元素所有 CSS 屬性值的物件。

MDN 參考

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

參數

elt

Element

pseudoElt

string | null

傳回

CSSStyleDeclaration

getSelection()

getSelection()視窗介面的方法會回傳與視窗文件相關的 Selection 物件,代表使用者所選擇的文字範圍或插入點目前的位置。

MDN 參考

function getSelection(): Selection | null

傳回

Selection | null

matchMedia(string)

視窗介面的方法會 matchMedia() 回傳一個新的 MediaQueryList 物件,可用來判斷文件是否符合媒體查詢字串,並監控文件以偵測是否匹配(或停止匹配)該媒體查詢。

MDN 參考

function matchMedia(query: string): MediaQueryList

參數

query

string

傳回

MediaQueryList

moveBy(number, number)

moveBy()視窗介面的方法會將當前視窗移動指定幅度。

MDN 參考

function moveBy(x: number, y: number)

參數

x

number

y

number

moveTo(number, number)

moveTo()視窗介面的方法將當前視窗移動到指定的座標。

MDN 參考

function moveTo(x: number, y: number)

參數

x

number

y

number

open(string | URL, string, string)

介面的方法Window將open()指定的資源載入新的或現有的瀏覽情境(例如分頁、視窗或 iframe),並以指定名稱進行。

MDN 參考

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

參數

url

string | URL

target

string

features

string

傳回

Window | null

postMessage(any, string, Transferable[])

此 window.postMessage() 方法能安全地實現視窗物件間的跨來源通訊; 例如,頁面 與其彈出視窗之間,或頁面與嵌入其中的 iframe 之間。

MDN 參考

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

參數

message

any

targetOrigin

string

transfer

Transferable[]

postMessage(any, WindowPostMessageOptions)

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

參數

message

any

options

WindowPostMessageOptions

print()

打開列印對話框以列印目前的文件。

MDN 參考

function print()

prompt(string, string)

window.prompt() 指示瀏覽器顯示對話框並附有可選訊息,提示使用者輸入文字,並等待使用者提交文字或取消對話框。

MDN 參考

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

參數

message

string

_default

string

傳回

string | null

releaseEvents()

警告

此 API 現已淘汰。

MDN Reference

解除視窗對特定類型事件的限制。

function releaseEvents()

removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)

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

參數

type

string

listener

EventListenerOrEventListenerObject

options

boolean | EventListenerOptions

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

removeEventListener() EventTarget 介面的方法會從目標中移除先前註冊於 EventTarget.addEventListener() 的事件監聽器。

MDN 參考

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

參數

type

K

listener

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

options

boolean | EventListenerOptions

requestIdleCallback(IdleRequestCallback, IdleRequestOptions)

此 window.requestIdleCallback() 方法會在瀏覽器閒置期間排隊呼叫函式。

MDN 參考

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

參數

callback

IdleRequestCallback

options

IdleRequestOptions

傳回

number

resizeBy(number, number)

此 Window.resizeBy() 方法會將當前視窗調整指定大小。

MDN 參考

function resizeBy(x: number, y: number)

參數

x

number

y

number

resizeTo(number, number)

此方法會 Window.resizeTo() 動態調整視窗大小。

MDN 參考

function resizeTo(width: number, height: number)

參數

width

number

height

number

scroll(number, number)

function scroll(x: number, y: number)

參數

x

number

y

number

scroll(ScrollToOptions)

此方法將 Window.scroll() 視窗捲動至文件中的特定位置。

MDN 參考

function scroll(options?: ScrollToOptions)

參數

options

ScrollToOptions

scrollBy(number, number)

function scrollBy(x: number, y: number)

參數

x

number

y

number

scrollBy(ScrollToOptions)

該 Window.scrollBy() 方法會在視窗中依指定長度滾動文件。

MDN 參考

function scrollBy(options?: ScrollToOptions)

參數

options

ScrollToOptions

scrollTo(number, number)

function scrollTo(x: number, y: number)

參數

x

number

y

number

scrollTo(ScrollToOptions)

Window.scrollTo() 捲動至文件中特定的座標集合。

MDN 參考

function scrollTo(options?: ScrollToOptions)

參數

options

ScrollToOptions

stop()

這些裝置 window.stop() 會停止在當前瀏覽情境中繼續載入資源,就像瀏覽器中的停止按鈕一樣。

MDN 參考

function stop()

繼承的方法的詳細資料

atob(string)

MDN 參考

function atob(data: string): string

參數

data

string

傳回

string

繼承自 WindowOrWorkerGlobalScope.atob

btoa(string)

MDN 參考

function btoa(data: string): string

參數

data

string

傳回

string

繼承自 WindowOrWorkerGlobalScope.btoa

cancelAnimationFrame(number)

MDN 參考

function cancelAnimationFrame(handle: number)

參數

handle

number

繼承自 AnimationFrameProvider.cancelAnimationFrame

clearInterval(number | undefined)

MDN 參考

function clearInterval(id: number | undefined)

參數

id

number | undefined

繼承自 WindowOrWorkerGlobalScope.clearInterval

clearTimeout(number | undefined)

MDN 參考

function clearTimeout(id: number | undefined)

參數

id

number | undefined

繼承自 WindowOrWorkerGlobalScope.clearTimeout

createImageBitmap(ImageBitmapSource, ImageBitmapOptions)

MDN 參考

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

參數

image

ImageBitmapSource

options

ImageBitmapOptions

傳回

Promise<ImageBitmap>

繼承自 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>

參數

image

ImageBitmapSource

sx

number

sy

number

sw

number

sh

number

options

ImageBitmapOptions

傳回

Promise<ImageBitmap>

繼承自 WindowOrWorkerGlobalScope.createImageBitmap

dispatchEvent(Event)

dispatchEvent() EventTarget 的方法(同步)向物件發送事件,並以適當順序呼叫受影響的事件監聽者。

MDN 參考

function dispatchEvent(event: Event): boolean

參數

event

Event

傳回

boolean

繼承自 EventTarget.dispatchEvent

fetch(URL | RequestInfo, RequestInit)

MDN 參考

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

參數

input

URL | RequestInfo

init

RequestInit

傳回

Promise<Response>

繼承自 WindowOrWorkerGlobalScope.fetch

queueMicrotask(VoidFunction)

MDN 參考

function queueMicrotask(callback: VoidFunction)

參數

callback

VoidFunction

繼承自 WindowOrWorkerGlobalScope.queueMicrotask

reportError(any)

MDN 參考

function reportError(e: any)

參數

e

any

繼承自 WindowOrWorkerGlobalScope.reportError

requestAnimationFrame(FrameRequestCallback)

MDN 參考

function requestAnimationFrame(callback: FrameRequestCallback): number

參數

callback

FrameRequestCallback

傳回

number

繼承自 AnimationFrameProvider.requestAnimationFrame

setInterval(TimerHandler, number, any[])

MDN 參考

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

參數

handler

TimerHandler

timeout

number

arguments

any[]

傳回

number

繼承自 WindowOrWorkerGlobalScope.setInterval

setTimeout(TimerHandler, number, any[])

MDN 參考

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

參數

handler

TimerHandler

timeout

number

arguments

any[]

傳回

number

繼承自 WindowOrWorkerGlobalScope.setTimeout

structuredClone<T>(T, StructuredSerializeOptions)

MDN 參考

function structuredClone<T>(value: T, options?: StructuredSerializeOptions): T

參數

value

T

options

StructuredSerializeOptions

傳回

T

繼承自 WindowOrWorkerGlobalScope.structuredClone