Window interface
包含 DOM 檔案的視窗;檔案屬性會指向在該視窗中載入的 DOM 檔。
- Extends
-
EventTarget,AnimationFrameProvider,GlobalEventHandlers,WindowEventHandlers,WindowLocalStorage,WindowOrWorkerGlobalScope,WindowSessionStorage
屬性
client |
|
closed | 如果視窗已經關閉,則傳回 true,否則傳回 false。 |
custom |
定義新的自定義專案,將指定的名稱對應至指定的建構函式做為自發的自定義專案。 |
device |
|
document | |
event | |
external | |
frame |
|
frames | |
history | |
inner |
|
inner |
|
length | |
location | |
locationbar | 如果位置列可見,則會傳回 true;否則會傳回 false。 |
menubar | 如果功能表欄可見,則會傳回 true;否則會傳回 false。 |
ms |
|
name | |
navigator | |
ondevicemotion | 僅適用於安全內容。 |
ondeviceorientation | 僅適用於安全內容。 |
onorientationchange | |
opener | |
orientation | |
outer |
|
outer |
|
page |
|
page |
|
parent | 是指父 WindowProxy 或本身。 對於已經從父代移除的 iframe 的 contentWindow,它很少會是 Null。 |
personalbar | 如果個人列可見,則傳回 true;否則會傳回 false。 |
powerbi | |
power |
|
screen | |
screen |
|
screen |
|
screenX | |
screenY | |
scrollbars | 如果滾動條可見,則傳回 true;否則會傳回 false。 |
scrollX | |
scrollY | |
self | |
speech |
|
status | |
statusbar | 如果狀態列為可見,則傳回 true;否則會傳回 false。 |
toolbar | 如果工具列可見,則會傳回 true;否則會傳回 false。 |
top | |
visual |
|
window |
繼承的屬性
方法
繼承的方法
屬性詳細資料
clientInformation
警告
此 API 現已淘汰。
This is a legacy alias of navigator
.
clientInformation: Navigator
屬性值
Navigator
closed
如果視窗已經關閉,則傳回 true,否則傳回 false。
closed: boolean
屬性值
boolean
customElements
定義新的自定義專案,將指定的名稱對應至指定的建構函式做為自發的自定義專案。
customElements: CustomElementRegistry
屬性值
CustomElementRegistry
devicePixelRatio
devicePixelRatio: number
屬性值
number
document
document: Document
屬性值
Document
event
警告
此 API 現已淘汰。
event: undefined | Event
屬性值
undefined | Event
external
警告
此 API 現已淘汰。
external: External
屬性值
External
frameElement
frameElement: null | Element
屬性值
null | Element
frames
frames: Window
屬性值
Window
history
history: History
屬性值
History
innerHeight
innerHeight: number
屬性值
number
innerWidth
innerWidth: number
屬性值
number
length
length: number
屬性值
number
location
Location location
屬性值
Location
locationbar
如果位置列可見,則會傳回 true;否則會傳回 false。
locationbar: BarProp
屬性值
BarProp
menubar
如果功能表欄可見,則會傳回 true;否則會傳回 false。
menubar: BarProp
屬性值
BarProp
msCrypto
msCrypto: Crypto
屬性值
Crypto
name
name: string
屬性值
string
navigator
navigator: Navigator
屬性值
Navigator
ondevicemotion
僅適用於安全內容。
ondevicemotion: null | (this: Window, ev: DeviceMotionEvent) => any
屬性值
null | (this: Window, ev: DeviceMotionEvent) => any
ondeviceorientation
僅適用於安全內容。
ondeviceorientation: null | (this: Window, ev: DeviceOrientationEvent) => any
屬性值
null | (this: Window, ev: DeviceOrientationEvent) => any
onorientationchange
警告
此 API 現已淘汰。
onorientationchange: null | (this: Window, ev: Event) => any
屬性值
null | (this: Window, ev: Event) => any
opener
opener: any
屬性值
any
orientation
警告
此 API 現已淘汰。
orientation: number
屬性值
number
outerHeight
outerHeight: number
屬性值
number
outerWidth
outerWidth: number
屬性值
number
pageXOffset
警告
此 API 現已淘汰。
This is a legacy alias of scrollX
.
pageXOffset: number
屬性值
number
pageYOffset
警告
此 API 現已淘汰。
This is a legacy alias of scrollY
.
pageYOffset: number
屬性值
number
parent
是指父 WindowProxy 或本身。
對於已經從父代移除的 iframe 的 contentWindow,它很少會是 Null。
parent: Window
屬性值
Window
personalbar
如果個人列可見,則傳回 true;否則會傳回 false。
personalbar: BarProp
屬性值
BarProp
powerbi
powerBISDKGlobalServiceInstanceName
powerBISDKGlobalServiceInstanceName?: string
屬性值
string
screen
screen: Screen
屬性值
Screen
screenLeft
screenLeft: number
屬性值
number
screenTop
screenTop: number
屬性值
number
screenX
screenX: number
屬性值
number
screenY
screenY: number
屬性值
number
scrollbars
如果滾動條可見,則傳回 true;否則會傳回 false。
scrollbars: BarProp
屬性值
BarProp
scrollX
scrollX: number
屬性值
number
scrollY
scrollY: number
屬性值
number
self
self: Window & typeof globalThis
屬性值
Window & typeof globalThis
speechSynthesis
speechSynthesis: SpeechSynthesis
屬性值
SpeechSynthesis
status
警告
此 API 現已淘汰。
status: string
屬性值
string
statusbar
如果狀態列為可見,則傳回 true;否則會傳回 false。
statusbar: BarProp
屬性值
BarProp
toolbar
如果工具列可見,則會傳回 true;否則會傳回 false。
toolbar: BarProp
屬性值
BarProp
top
top: null | Window
屬性值
null | Window
visualViewport
visualViewport: null | VisualViewport
屬性值
null | VisualViewport
window
window: Window & typeof globalThis
屬性值
Window & typeof globalThis
繼承的屬性詳細資料
caches
僅適用於安全內容。
caches: CacheStorage
屬性值
CacheStorage
繼承自 WindowOrWorkerGlobalScope.caches
crossOriginIsolated
crossOriginIsolated: boolean
屬性值
boolean
繼承自 WindowOrWorkerGlobalScope.crossOriginIsolated
crypto
crypto: Crypto
屬性值
Crypto
繼承自 WindowOrWorkerGlobalScope.crypto
indexedDB
indexedDB: IDBFactory
屬性值
IDBFactory
繼承自 WindowOrWorkerGlobalScope.indexedDB
isSecureContext
isSecureContext: boolean
屬性值
boolean
繼承自 WindowOrWorkerGlobalScope.isSecureContext
localStorage
localStorage: Storage
屬性值
Storage
繼承自 WindowLocalStorage.localStorage
onabort
當使用者中止下載時引發。
onabort: null | (this: GlobalEventHandlers, ev: UIEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: UIEvent) => any
繼承自 GlobalEventHandlers.onabort
onafterprint
onafterprint: null | (this: WindowEventHandlers, ev: Event) => any
屬性值
null | (this: WindowEventHandlers, ev: Event) => any
繼承自 WindowEventHandlers.onafterprint
onanimationcancel
onanimationcancel: null | (this: GlobalEventHandlers, ev: AnimationEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: AnimationEvent) => any
繼承自 GlobalEventHandlers.onanimationcancel
onanimationend
onanimationend: null | (this: GlobalEventHandlers, ev: AnimationEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: AnimationEvent) => any
繼承自 globalEventHandlers.onanimationend
onanimationiteration
onanimationiteration: null | (this: GlobalEventHandlers, ev: AnimationEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: AnimationEvent) => any
繼承自 GlobalEventHandlers.onanimationiteration
onanimationstart
onanimationstart: null | (this: GlobalEventHandlers, ev: AnimationEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: AnimationEvent) => any
繼承自 GlobalEventHandlers.onanimationstart
onauxclick
onauxclick: null | (this: GlobalEventHandlers, ev: MouseEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: MouseEvent) => any
繼承自 GlobalEventHandlers.onauxclick
onbeforeinput
onbeforeinput: null | (this: GlobalEventHandlers, ev: InputEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: InputEvent) => any
繼承自 GlobalEventHandlers.onbeforeinput
onbeforeprint
onbeforeprint: null | (this: WindowEventHandlers, ev: Event) => any
屬性值
null | (this: WindowEventHandlers, ev: Event) => any
繼承自 WindowEventHandlers.onbeforeprint
onbeforeunload
onbeforeunload: null | (this: WindowEventHandlers, ev: BeforeUnloadEvent) => any
屬性值
null | (this: WindowEventHandlers, ev: BeforeUnloadEvent) => any
繼承自 WindowEventHandlers.onbeforeunload
onblur
當物件失去輸入焦點時引發。
onblur: null | (this: GlobalEventHandlers, ev: FocusEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: FocusEvent) => any
繼承自 GlobalEventHandlers.onblur
oncancel
oncancel: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 globalEventHandlers.oncancel
oncanplay
發生於可能播放時,但需要進一步的緩衝處理。
oncanplay: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 globalEventHandlers.oncanplay
oncanplaythrough
oncanplaythrough: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.oncanplaythrough
onchange
當物件或選取範圍的內容變更時引發。
onchange: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onchange
onclick
當使用者按兩下物件上的滑鼠左鍵時引發
onclick: null | (this: GlobalEventHandlers, ev: MouseEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: MouseEvent) => any
繼承自 GlobalEventHandlers.onclick
onclose
onclose: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 globalEventHandlers.onclose
oncontextmenu
當使用者單擊工作區中的滑鼠右鍵時引發,開啟操作功能表。
oncontextmenu: null | (this: GlobalEventHandlers, ev: MouseEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: MouseEvent) => any
繼承自 GlobalEventHandlers.oncontextmenu
oncuechange
oncuechange: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.oncuechange
ondblclick
當使用者按兩下 物件時引發。
ondblclick: null | (this: GlobalEventHandlers, ev: MouseEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: MouseEvent) => any
繼承自 GlobalEventHandlers.ondblclick
ondrag
在拖曳作業期間持續引發來源物件。
ondrag: null | (this: GlobalEventHandlers, ev: DragEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: DragEvent) => any
繼承自 GlobalEventHandlers.ondrag
ondragend
當使用者在拖曳作業結束時放開滑鼠時,會在來源對象上引發。
ondragend: null | (this: GlobalEventHandlers, ev: DragEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: DragEvent) => any
繼承自 GlobalEventHandlers.ondragend
ondragenter
當使用者將物件拖曳至有效的置放目標時,會在目標項目上引發。
ondragenter: null | (this: GlobalEventHandlers, ev: DragEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: DragEvent) => any
繼承自 GlobalEventHandlers.ondragenter
ondragleave
當使用者在拖曳作業期間將滑鼠移出有效的置放目標時,會在目標對象上引發。
ondragleave: null | (this: GlobalEventHandlers, ev: DragEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: DragEvent) => any
繼承自 globalEventHandlers.ondragleave
ondragover
當使用者將物件拖曳到有效的置放目標上時,會持續引發目標專案。
ondragover: null | (this: GlobalEventHandlers, ev: DragEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: DragEvent) => any
繼承自 GlobalEventHandlers.ondragover
ondragstart
當用戶開始拖曳文字選取範圍或選取的物件時,會引發來源物件。
ondragstart: null | (this: GlobalEventHandlers, ev: DragEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: DragEvent) => any
繼承自 GlobalEventHandlers.ondragstart
ondrop
ondrop: null | (this: GlobalEventHandlers, ev: DragEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: DragEvent) => any
繼承自 globalEventHandlers.ondrop
ondurationchange
發生於更新 duration 屬性時。
ondurationchange: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.ondurationchange
onemptied
當媒體專案重設為其初始狀態時發生。
onemptied: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onemptied
onended
發生於到達播放結束時。
onended: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onended
onerror
在物件載入期間發生錯誤時引發。
onerror: OnErrorEventHandler
屬性值
OnErrorEventHandler
繼承自 GlobalEventHandlers.onerror
onfocus
當物件收到焦點時引發。
onfocus: null | (this: GlobalEventHandlers, ev: FocusEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: FocusEvent) => any
繼承自 GlobalEventHandlers.onfocus
onformdata
onformdata: null | (this: GlobalEventHandlers, ev: FormDataEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: FormDataEvent) => any
繼承自 GlobalEventHandlers.onformdata
ongamepadconnected
ongamepadconnected: null | (this: WindowEventHandlers, ev: GamepadEvent) => any
屬性值
null | (this: WindowEventHandlers, ev: GamepadEvent) => any
繼承自 WindowEventHandlers.ongamepadconnected
ongamepaddisconnected
ongamepaddisconnected: null | (this: WindowEventHandlers, ev: GamepadEvent) => any
屬性值
null | (this: WindowEventHandlers, ev: GamepadEvent) => any
繼承自 WindowEventHandlers.ongamepaddisconnected
ongotpointercapture
ongotpointercapture: null | (this: GlobalEventHandlers, ev: PointerEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: PointerEvent) => any
繼承自 GlobalEventHandlers.ongotpointercapture
onhashchange
onhashchange: null | (this: WindowEventHandlers, ev: HashChangeEvent) => any
屬性值
null | (this: WindowEventHandlers, ev: HashChangeEvent) => any
繼承自 WindowEventHandlers.onhashchange
oninput
oninput: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.oninput
oninvalid
oninvalid: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.oninvalid
onkeydown
當使用者按下按鍵時引發。
onkeydown: null | (this: GlobalEventHandlers, ev: KeyboardEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: KeyboardEvent) => any
繼承自 GlobalEventHandlers.onkeydown
onkeypress
警告
此 API 現已淘汰。
當使用者按下英數位元鍵時引發。
onkeypress: null | (this: GlobalEventHandlers, ev: KeyboardEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: KeyboardEvent) => any
繼承自 globalEventHandlers.onkeypress
onkeyup
當使用者放開金鑰時引發。
onkeyup: null | (this: GlobalEventHandlers, ev: KeyboardEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: KeyboardEvent) => any
繼承自 GlobalEventHandlers.onkeyup
onlanguagechange
onlanguagechange: null | (this: WindowEventHandlers, ev: Event) => any
屬性值
null | (this: WindowEventHandlers, ev: Event) => any
繼承自 WindowEventHandlers.onlanguagechange
onload
在瀏覽器載入 物件之後立即引發。
onload: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 globalEventHandlers.onload
onloadeddata
在目前播放位置載入媒體數據時發生。
onloadeddata: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onloadeddata
onloadedmetadata
發生於已判斷媒體的持續時間和維度時。
onloadedmetadata: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onloadedmetadata
onloadstart
當 Internet Explorer 開始尋找媒體數據時發生。
onloadstart: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onloadstart
onlostpointercapture
onlostpointercapture: null | (this: GlobalEventHandlers, ev: PointerEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: PointerEvent) => any
繼承自 GlobalEventHandlers.onlostpointercapture
onmessage
onmessage: null | (this: WindowEventHandlers, ev: MessageEvent<any>) => any
屬性值
null | (this: WindowEventHandlers, ev: MessageEvent<any>) => any
繼承自 WindowEventHandlers.onmessage
onmessageerror
onmessageerror: null | (this: WindowEventHandlers, ev: MessageEvent<any>) => any
屬性值
null | (this: WindowEventHandlers, ev: MessageEvent<any>) => any
繼承自 WindowEventHandlers.onmessageerror
onmousedown
當使用者使用任一滑鼠按鈕按兩下 物件時引發。
onmousedown: null | (this: GlobalEventHandlers, ev: MouseEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: MouseEvent) => any
繼承自 GlobalEventHandlers.onmousedown
onmouseenter
onmouseenter: null | (this: GlobalEventHandlers, ev: MouseEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: MouseEvent) => any
繼承自 GlobalEventHandlers.onmouseenter
onmouseleave
onmouseleave: null | (this: GlobalEventHandlers, ev: MouseEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: MouseEvent) => any
繼承自 GlobalEventHandlers.onmouseleave
onmousemove
當使用者將滑鼠移至物件上方時引發。
onmousemove: null | (this: GlobalEventHandlers, ev: MouseEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: MouseEvent) => any
繼承自 globalEventHandlers.onmousemove
onmouseout
當使用者將滑鼠指標移至物件界限之外時引發。
onmouseout: null | (this: GlobalEventHandlers, ev: MouseEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: MouseEvent) => any
繼承自 GlobalEventHandlers.onmouseout
onmouseover
當使用者將滑鼠指標移至 物件時引發。
onmouseover: null | (this: GlobalEventHandlers, ev: MouseEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: MouseEvent) => any
繼承自 GlobalEventHandlers.onmouseover
onmouseup
當使用者放開滑鼠按鈕時,會在物件上方放開滑鼠按鈕時引發。
onmouseup: null | (this: GlobalEventHandlers, ev: MouseEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: MouseEvent) => any
繼承自 GlobalEventHandlers.onmouseup
onoffline
onoffline: null | (this: WindowEventHandlers, ev: Event) => any
屬性值
null | (this: WindowEventHandlers, ev: Event) => any
繼承自 WindowEventHandlers.onoffline
ononline
ononline: null | (this: WindowEventHandlers, ev: Event) => any
屬性值
null | (this: WindowEventHandlers, ev: Event) => any
繼承自 WindowEventHandlers.ononline
onpagehide
onpagehide: null | (this: WindowEventHandlers, ev: PageTransitionEvent) => any
屬性值
null | (this: WindowEventHandlers, ev: PageTransitionEvent) => any
繼承自 WindowEventHandlers.onpagehide
onpageshow
onpageshow: null | (this: WindowEventHandlers, ev: PageTransitionEvent) => any
屬性值
null | (this: WindowEventHandlers, ev: PageTransitionEvent) => any
繼承自 WindowEventHandlers.onpageshow
onpause
發生於暫停播放時。
onpause: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onpause
onplay
發生於要求播放方法時。
onplay: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 globalEventHandlers.onplay
onplaying
當音訊或視訊開始播放時發生。
onplaying: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 globalEventHandlers.onplaying
onpointercancel
onpointercancel: null | (this: GlobalEventHandlers, ev: PointerEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: PointerEvent) => any
繼承自 globalEventHandlers.onpointercancel
onpointerdown
onpointerdown: null | (this: GlobalEventHandlers, ev: PointerEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: PointerEvent) => any
繼承自 globalEventHandlers.onpointerdown
onpointerenter
onpointerenter: null | (this: GlobalEventHandlers, ev: PointerEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: PointerEvent) => any
繼承自 GlobalEventHandlers.onpointerenter
onpointerleave
onpointerleave: null | (this: GlobalEventHandlers, ev: PointerEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: PointerEvent) => any
繼承自 globalEventHandlers.onpointerleave
onpointermove
onpointermove: null | (this: GlobalEventHandlers, ev: PointerEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: PointerEvent) => any
繼承自 GlobalEventHandlers.onpointermove
onpointerout
onpointerout: null | (this: GlobalEventHandlers, ev: PointerEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: PointerEvent) => any
繼承自 globalEventHandlers.onpointerout
onpointerover
onpointerover: null | (this: GlobalEventHandlers, ev: PointerEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: PointerEvent) => any
繼承自 globalEventHandlers.onpointerover
onpointerup
onpointerup: null | (this: GlobalEventHandlers, ev: PointerEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: PointerEvent) => any
繼承自 GlobalEventHandlers.onpointerup
onpopstate
onpopstate: null | (this: WindowEventHandlers, ev: PopStateEvent) => any
屬性值
null | (this: WindowEventHandlers, ev: PopStateEvent) => any
繼承自 WindowEventHandlers.onpopstate
onprogress
發生於表示下載媒體數據時的進度。
onprogress: null | (this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any
屬性值
null | (this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any
繼承自 GlobalEventHandlers.onprogress
onratechange
發生於播放速率增加或減少時。
onratechange: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onratechange
onrejectionhandled
onrejectionhandled: null | (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any
屬性值
null | (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any
繼承自 WindowEventHandlers.onrejectionhandled
onreset
當使用者重設表單時引發。
onreset: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onreset
onresize
onresize: null | (this: GlobalEventHandlers, ev: UIEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: UIEvent) => any
繼承自 GlobalEventHandlers.onresize
onscroll
當用戶在物件上的滾動條中重新放置滾動盒時引發。
onscroll: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onscroll
onsecuritypolicyviolation
onsecuritypolicyviolation: null | (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any
繼承自 globalEventHandlers.onsecuritypolicyviolation
onseeked
當搜尋作業結束時發生。
onseeked: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onseeked
onseeking
發生於移動目前播放位置時。
onseeking: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onseeking
onselect
當目前的選取範圍變更時引發。
onselect: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onselect
onselectionchange
onselectionchange: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onselectionchange
onselectstart
onselectstart: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onselectstart
onslotchange
onslotchange: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onslotchange
onstalled
發生於下載已停止時。
onstalled: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onstalled
onstorage
onstorage: null | (this: WindowEventHandlers, ev: StorageEvent) => any
屬性值
null | (this: WindowEventHandlers, ev: StorageEvent) => any
繼承自 WindowEventHandlers.onstorage
onsubmit
onsubmit: null | (this: GlobalEventHandlers, ev: SubmitEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: SubmitEvent) => any
繼承自 GlobalEventHandlers.onsubmit
onsuspend
如果已刻意停止載入作業,就會發生。
onsuspend: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onsuspend
ontimeupdate
發生於指出目前播放位置時。
ontimeupdate: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.ontimeupdate
ontoggle
ontoggle: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.ontoggle
ontouchcancel
ontouchcancel?: null | (this: GlobalEventHandlers, ev: TouchEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: TouchEvent) => any
繼承自 GlobalEventHandlers.ontouchcancel
ontouchend
ontouchend?: null | (this: GlobalEventHandlers, ev: TouchEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: TouchEvent) => any
繼承自 GlobalEventHandlers.ontouchend
ontouchmove
ontouchmove?: null | (this: GlobalEventHandlers, ev: TouchEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: TouchEvent) => any
繼承自 GlobalEventHandlers.ontouchmove
ontouchstart
ontouchstart?: null | (this: GlobalEventHandlers, ev: TouchEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: TouchEvent) => any
繼承自 GlobalEventHandlers.ontouchstart
ontransitioncancel
ontransitioncancel: null | (this: GlobalEventHandlers, ev: TransitionEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: TransitionEvent) => any
繼承自 GlobalEventHandlers.ontransitioncancel
ontransitionend
ontransitionend: null | (this: GlobalEventHandlers, ev: TransitionEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: TransitionEvent) => any
繼承自 GlobalEventHandlers.ontransitionend
ontransitionrun
ontransitionrun: null | (this: GlobalEventHandlers, ev: TransitionEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: TransitionEvent) => any
繼承自 GlobalEventHandlers.ontransitionrun
ontransitionstart
ontransitionstart: null | (this: GlobalEventHandlers, ev: TransitionEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: TransitionEvent) => any
繼承自 GlobalEventHandlers.ontransitionstart
onunhandledrejection
onunhandledrejection: null | (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any
屬性值
null | (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any
繼承自 WindowEventHandlers.onunhandledrejection
onunload
onunload: null | (this: WindowEventHandlers, ev: Event) => any
屬性值
null | (this: WindowEventHandlers, ev: Event) => any
繼承自 WindowEventHandlers.onunload
onvolumechange
發生於磁碟區變更或靜音或取消靜音時。
onvolumechange: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 globalEventHandlers.onvolumechange
onwaiting
播放停止時發生,因為影片資源的下一個畫面無法使用。
onwaiting: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onwaiting
onwebkitanimationend
警告
此 API 現已淘汰。
This is a legacy alias of onanimationend
.
onwebkitanimationend: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 globalEventHandlers.onwebkitanimationend
onwebkitanimationiteration
警告
此 API 現已淘汰。
This is a legacy alias of onanimationiteration
.
onwebkitanimationiteration: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 globalEventHandlers.onwebkitanimationiteration
onwebkitanimationstart
警告
此 API 現已淘汰。
This is a legacy alias of onanimationstart
.
onwebkitanimationstart: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 GlobalEventHandlers.onwebkitanimationstart
onwebkittransitionend
警告
此 API 現已淘汰。
This is a legacy alias of ontransitionend
.
onwebkittransitionend: null | (this: GlobalEventHandlers, ev: Event) => any
屬性值
null | (this: GlobalEventHandlers, ev: Event) => any
繼承自 globalEventHandlers.onwebkittransitionend
onwheel
onwheel: null | (this: GlobalEventHandlers, ev: WheelEvent) => any
屬性值
null | (this: GlobalEventHandlers, ev: WheelEvent) => any
繼承自 GlobalEventHandlers.onwheel
origin
origin: string
屬性值
string
繼承自 WindowOrWorkerGlobalScope.origin
performance
performance: Performance
屬性值
Performance
繼承自 WindowOrWorkerGlobalScope.performance
sessionStorage
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)
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)
function alert(message?: any)
參數
- message
-
any
blur()
function blur()
cancelIdleCallback(number)
function cancelIdleCallback(handle: number)
參數
- handle
-
number
captureEvents()
警告
此 API 現已淘汰。
function captureEvents()
close()
關閉視窗。
function close()
confirm(string)
function confirm(message?: string): boolean
參數
- message
-
string
傳回
boolean
focus()
如果有的話,將焦點移至視窗的瀏覽內容。
function focus()
getComputedStyle(Element, null | string)
function getComputedStyle(elt: Element, pseudoElt?: null | string): CSSStyleDeclaration
參數
- elt
-
Element
- pseudoElt
-
null | string
傳回
CSSStyleDeclaration
getSelection()
function getSelection(): null | Selection
傳回
null | Selection
matchMedia(string)
function matchMedia(query: string): MediaQueryList
參數
- query
-
string
傳回
MediaQueryList
moveBy(number, number)
function moveBy(x: number, y: number)
參數
- x
-
number
- y
-
number
moveTo(number, number)
function moveTo(x: number, y: number)
參數
- x
-
number
- y
-
number
open(string | URL, string, string)
function open(url?: string | URL, target?: string, features?: string): null | Window
參數
- url
-
string | URL
- target
-
string
- features
-
string
傳回
null | Window
postMessage(any, string, Transferable[])
將訊息張貼至指定的視窗。 訊息可以是結構化物件,例如巢狀物件和陣列,可以包含JavaScript值(字串、數位、日期物件等),也可以包含特定數據物件,例如File Blob、FileList和ArrayBuffer物件。
選項傳輸成員中列出的物件會傳輸,而不只是複製,這表示它們不再可在傳送端使用。
您可以使用選項的 targetOrigin 成員來指定目標來源。 如果未提供,則預設為 “/”。 此預設值只會將訊息限製為相同的原始目標。
如果目標視窗的來源不符合指定的目標來源,則會捨棄訊息,以避免資訊外洩。 若要將訊息傳送至目標,不論來源為何,請將目標來源設定為 “*”。
如果傳輸陣列包含重複的物件,或無法複製訊息,則會擲回 “DataCloneError” DOMException。
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()
function print()
prompt(string, string)
function prompt(message?: string, _default?: string): null | string
參數
- message
-
string
- _default
-
string
傳回
null | string
releaseEvents()
警告
此 API 現已淘汰。
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)
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)
function requestIdleCallback(callback: IdleRequestCallback, options?: IdleRequestOptions): number
參數
- callback
-
IdleRequestCallback
- options
-
IdleRequestOptions
傳回
number
resizeBy(number, number)
function resizeBy(x: number, y: number)
參數
- x
-
number
- y
-
number
resizeTo(number, number)
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)
function scroll(options?: ScrollToOptions)
參數
- options
-
ScrollToOptions
scrollBy(number, number)
function scrollBy(x: number, y: number)
參數
- x
-
number
- y
-
number
scrollBy(ScrollToOptions)
function scrollBy(options?: ScrollToOptions)
參數
- options
-
ScrollToOptions
scrollTo(number, number)
function scrollTo(x: number, y: number)
參數
- x
-
number
- y
-
number
scrollTo(ScrollToOptions)
function scrollTo(options?: ScrollToOptions)
參數
- options
-
ScrollToOptions
stop()
取消檔案載入。
function stop()
繼承的方法的詳細資料
atob(string)
function atob(data: string): string
參數
- data
-
string
傳回
string
繼承自 WindowOrWorkerGlobalScope.atob
btoa(string)
function btoa(data: string): string
參數
- data
-
string
傳回
string
繼承自 WindowOrWorkerGlobalScope.btoa
cancelAnimationFrame(number)
function cancelAnimationFrame(handle: number)
參數
- handle
-
number
繼承自 AnimationFrameProvider.cancelAnimationFrame
clearInterval(undefined | number)
function clearInterval(id: undefined | number)
參數
- id
-
undefined | number
繼承自 WindowOrWorkerGlobalScope.clearInterval
clearTimeout(undefined | number)
function clearTimeout(id: undefined | number)
參數
- id
-
undefined | number
繼承自 WindowOrWorkerGlobalScope.clearTimeout
createImageBitmap(ImageBitmapSource, ImageBitmapOptions)
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)
如果事件的可取消屬性值為 false,或未叫用其 preventDefault() 方法,則分派綜合事件事件的目標並傳回 true,否則傳回 false。
function dispatchEvent(event: Event): boolean
參數
- event
-
Event
傳回
boolean
繼承自 EventTarget.dispatchEvent
fetch(URL | RequestInfo, RequestInit)
function fetch(input: URL | RequestInfo, init?: RequestInit): Promise<Response>
參數
- input
-
URL | RequestInfo
- init
-
RequestInit
傳回
Promise<Response>
繼承自 WindowOrWorkerGlobalScope.fetch
queueMicrotask(VoidFunction)
function queueMicrotask(callback: VoidFunction)
參數
- callback
-
VoidFunction
繼承自 WindowOrWorkerGlobalScope.queueMicrotask
reportError(any)
function reportError(e: any)
參數
- e
-
any
繼承自 WindowOrWorkerGlobalScope.reportError
requestAnimationFrame(FrameRequestCallback)
function requestAnimationFrame(callback: FrameRequestCallback): number
參數
- callback
-
FrameRequestCallback
傳回
number
繼承自 AnimationFrameProvider.requestAnimationFrame
setInterval(TimerHandler, number, any[])
function setInterval(handler: TimerHandler, timeout?: number, arguments: any[]): number
參數
- handler
-
TimerHandler
- timeout
-
number
- arguments
-
any[]
傳回
number
繼承自 WindowOrWorkerGlobalScope.setInterval
setTimeout(TimerHandler, number, any[])
function setTimeout(handler: TimerHandler, timeout?: number, arguments: any[]): number
參數
- handler
-
TimerHandler
- timeout
-
number
- arguments
-
any[]
傳回
number
繼承自 WindowOrWorkerGlobalScope.setTimeout
structuredClone(any, StructuredSerializeOptions)
function structuredClone(value: any, options?: StructuredSerializeOptions): any
參數
- value
-
any
- options
-
StructuredSerializeOptions
傳回
any
繼承自 WindowOrWorkerGlobalScope.structuredClone