Window interface
介面 Window 代表一個包含 DOM 文件的視窗;屬性 document 指向該視窗載入的 DOM 文件。
- Extends
-
EventTarget,AnimationFrameProvider,GlobalEventHandlers,WindowEventHandlers,WindowLocalStorage,WindowOrWorkerGlobalScope,WindowSessionStorage
屬性
| client |
|
| closed |
|
| cookie |
|
| custom |
|
| device |
|
| document |
|
| event | 唯讀視窗屬性 |
| external |
|
| frame |
該 |
| frames | 回傳視窗本身,這是一個陣列狀物件,列出目前視窗的直接子框架。 |
| history | 唯讀屬性會 |
| inner |
如果存在,則包含了水平捲動條的高度,該特性為唯讀 |
| inner |
唯讀視窗屬性 |
| length | 回傳影格數(可選為影格或 A 編號)。 |
| location | 唯讀屬性會 |
| locationbar | 回傳物件 |
| menubar | 回傳物件 |
| ms |
|
| name | 這個 |
| navigator | 唯讀屬性會 |
| ondevicemotion | 僅適用於安全內容。 |
| ondeviceorientation | 僅適用於安全內容。 |
| ondeviceorientationabsolute | 僅適用於安全內容。 |
| onorientationchange | |
| opener | 視窗介面的屬性會 |
| orientation | 以視窗相對於裝置自然方向的度數(90度遞增)回傳方向。 |
| origin |
|
| outer |
|
| outer |
|
| page |
|
| page |
|
| parent | 該 |
| personalbar | 回傳物件 |
| powerbi | |
| power |
|
| screen | 視窗屬性 |
| screen |
|
| screen |
|
| screenX |
|
| screenY |
|
| scrollbars | 回傳物件 |
| scrollX | 視窗介面的唯讀 |
| scrollY | 視窗介面的唯讀 |
| self | 唯讀屬性會 |
| speech |
|
| status | 瀏覽器 |
| statusbar | 回傳物件 |
| toolbar | 回傳物件 |
| top | 回傳視窗階層中最頂端視窗的參考。 |
| visual |
|
| window | Window 物件的屬性指向 |
繼承的屬性
方法
| add |
|
| add |
|
| alert(any) |
|
| blur() | 這個 |
| cancel |
此 |
| capture |
這個 |
| close() | 此 |
| confirm(string) |
|
| focus() | 他提出要把窗戶移到前面。 |
| get |
|
| get |
|
| match |
視窗介面的方法會 |
| move |
|
| move |
|
| open(string | URL, string, string) | 介面的方法 |
| post |
此 |
| post |
|
| print() | 打開列印對話框以列印目前的文件。 |
| prompt(string, string) |
|
| release |
解除視窗對特定類型事件的限制。 |
| remove |
|
| remove |
|
| request |
此 |
| resize |
此 |
| resize |
此方法會 |
| scroll(number, number) | |
| scroll(Scroll |
此方法將 |
| scroll |
|
| scroll |
該 |
| scroll |
|
| scroll |
|
| stop() | 這些裝置 |
繼承的方法
屬性詳細資料
clientInformation
clientInformation: Navigator
屬性值
Navigator
closed
cookieStore
customElements
customElements視窗介面的唯讀屬性會回傳 CustomElementRegistry 物件的參考,該物件可用來註冊新的自訂元素並取得先前註冊的自訂元素資訊。
customElements: CustomElementRegistry
屬性值
CustomElementRegistry
devicePixelRatio
devicePixelRatio Window 介面會回傳目前顯示裝置的實體像素解析度與 CSS 像素解析度的比率。
devicePixelRatio: number
屬性值
number
event
唯讀視窗屬性 event 會回傳目前由網站程式碼處理的事件。
event: Event | undefined
屬性值
Event | undefined
external
external Windows API 的屬性會回傳介面的實例,該實例External原本是用來包含與新增外部搜尋提供者相關的函式。
external: External
屬性值
External
frameElement
該 Window.frameElement 屬性會回傳嵌入視窗的元素(例如 iframe 或物件)。
frameElement: Element | null
屬性值
Element | null
history
唯讀屬性會 Window.history 回傳對 History 物件的參考,該物件提供操作瀏覽器 會話歷史 (即目前頁面載入分頁或框架中造訪的頁面)的介面。
history: History
屬性值
History
innerHeight
innerWidth
length
location
locationbar
menubar
msCrypto
msCrypto: Crypto
屬性值
Crypto
name
navigator
唯讀屬性會 Window.navigator 回傳一個 Navigator 物件的參考,該物件包含執行腳本應用程式的方法與屬性。
navigator: Navigator
屬性值
Navigator
ondevicemotion
僅適用於安全內容。
ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any | null
屬性值
(this: Window, ev: DeviceMotionEvent) => any | null
ondeviceorientation
僅適用於安全內容。
ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any | null
屬性值
(this: Window, ev: DeviceOrientationEvent) => any | null
ondeviceorientationabsolute
僅適用於安全內容。
ondeviceorientationabsolute: (this: Window, ev: DeviceOrientationEvent) => any | null
屬性值
(this: Window, ev: DeviceOrientationEvent) => any | null
onorientationchange
onorientationchange: (this: Window, ev: Event) => any | null
屬性值
(this: Window, ev: Event) => any | null
opener
orientation
originAgentCluster
originAgentCluster如果視窗屬於源鍵代理叢集,則該視窗介面的唯讀特性會回傳true:這表示作業系統已為該視窗的起源提供專用資源(例如作業系統程序),這些資源並未與其他來源的視窗共享。
originAgentCluster: boolean
屬性值
boolean
outerHeight
Window.outerHeight唯讀屬性會回傳整個瀏覽器視窗的高度(像素),包括任何側邊欄、視窗 Chrome 以及視窗大小調整的邊框/把手。
outerHeight: number
屬性值
number
outerWidth
pageXOffset
pageYOffset
personalbar
powerbi
powerBISDKGlobalServiceInstanceName
powerBISDKGlobalServiceInstanceName?: string
屬性值
string
screen
screenLeft
screenTop
screenX
screenY
scrollbars
scrollX
scrollY
self
speechSynthesis
speechSynthesis視窗物件的唯讀特性會回傳一個語音合成物件,這是使用 Web Speech API 語音合成功能的入口。
speechSynthesis: SpeechSynthesis
屬性值
SpeechSynthesis
status
statusbar
toolbar
visualViewport
visualViewport視窗介面的唯讀屬性會回傳一個 VisualViewport 物件,代表該視窗的視覺視埠,或null當當前文件尚未完全啟用時。
visualViewport: VisualViewport | null
屬性值
VisualViewport | null
window
繼承的屬性詳細資料
caches
crossOriginIsolated
crypto
indexedDB
isSecureContext
localStorage
onabort
onabort: (this: GlobalEventHandlers, ev: UIEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: UIEvent) => any | null
繼承自 GlobalEventHandlers.onabort
onafterprint
onafterprint: (this: WindowEventHandlers, ev: Event) => any | null
屬性值
(this: WindowEventHandlers, ev: Event) => any | null
繼承自 WindowEventHandlers.onafterprint
onanimationcancel
onanimationcancel: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: AnimationEvent) => any | null
繼承自 GlobalEventHandlers.onanimationcancel
onanimationend
onanimationend: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: AnimationEvent) => any | null
繼承自 globalEventHandlers.onanimationend
onanimationiteration
onanimationiteration: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: AnimationEvent) => any | null
繼承自 GlobalEventHandlers.onanimationiteration
onanimationstart
onanimationstart: (this: GlobalEventHandlers, ev: AnimationEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: AnimationEvent) => any | null
繼承自 GlobalEventHandlers.onanimationstart
onauxclick
onauxclick: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 GlobalEventHandlers.onauxclick
onbeforeinput
onbeforeinput: (this: GlobalEventHandlers, ev: InputEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: InputEvent) => any | null
繼承自 GlobalEventHandlers.onbeforeinput
onbeforematch
onbeforematch: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onprematch
onbeforeprint
onbeforeprint: (this: WindowEventHandlers, ev: Event) => any | null
屬性值
(this: WindowEventHandlers, ev: Event) => any | null
繼承自 WindowEventHandlers.onbeforeprint
onbeforetoggle
onbeforetoggle: (this: GlobalEventHandlers, ev: ToggleEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: ToggleEvent) => any | null
繼承自 GlobalEventHandlers.onbeforetoggle
onbeforeunload
onbeforeunload: (this: WindowEventHandlers, ev: BeforeUnloadEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: BeforeUnloadEvent) => any | null
繼承自 WindowEventHandlers.onbeforeunload
onblur
onblur: (this: GlobalEventHandlers, ev: FocusEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: FocusEvent) => any | null
繼承自 GlobalEventHandlers.onblur
oncancel
oncancel: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 globalEventHandlers.oncancel
oncanplay
oncanplay: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 globalEventHandlers.oncanplay
oncanplaythrough
oncanplaythrough: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.oncanplaythrough
onchange
onchange: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onchange
onclick
onclick: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 GlobalEventHandlers.onclick
onclose
onclose: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 globalEventHandlers.onclose
oncontextlost
oncontextlost: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.oncontextlost
oncontextmenu
oncontextmenu: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 GlobalEventHandlers.oncontextmenu
oncontextrestored
oncontextrestored: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.oncontextrestored
oncopy
oncopy: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null
繼承自 GlobalEventHandlers.oncopy
oncuechange
oncuechange: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.oncuechange
oncut
oncut: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null
繼承自 GlobalEventHandlers.oncut
ondblclick
ondblclick: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
繼承自 GlobalEventHandlers.ondblclick
ondrag
ondrag: (this: GlobalEventHandlers, ev: DragEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: DragEvent) => any | null
繼承自 GlobalEventHandlers.ondrag
ondragend
ondragend: (this: GlobalEventHandlers, ev: DragEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: DragEvent) => any | null
繼承自 GlobalEventHandlers.ondragend
ondragenter
ondragenter: (this: GlobalEventHandlers, ev: DragEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: DragEvent) => any | null
繼承自 GlobalEventHandlers.ondragenter
ondragleave
ondragleave: (this: GlobalEventHandlers, ev: DragEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: DragEvent) => any | null
繼承自 globalEventHandlers.ondragleave
ondragover
ondragover: (this: GlobalEventHandlers, ev: DragEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: DragEvent) => any | null
繼承自 GlobalEventHandlers.ondragover
ondragstart
ondragstart: (this: GlobalEventHandlers, ev: DragEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: DragEvent) => any | null
繼承自 GlobalEventHandlers.ondragstart
ondrop
ondrop: (this: GlobalEventHandlers, ev: DragEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: DragEvent) => any | null
繼承自 globalEventHandlers.ondrop
ondurationchange
ondurationchange: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.ondurationchange
onemptied
onemptied: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onemptied
onended
onended: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onended
onerror
onfocus
onfocus: (this: GlobalEventHandlers, ev: FocusEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: FocusEvent) => any | null
繼承自 GlobalEventHandlers.onfocus
onformdata
onformdata: (this: GlobalEventHandlers, ev: FormDataEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: FormDataEvent) => any | null
繼承自 GlobalEventHandlers.onformdata
ongamepadconnected
ongamepadconnected: (this: WindowEventHandlers, ev: GamepadEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: GamepadEvent) => any | null
繼承自 WindowEventHandlers.ongamepadconnected
ongamepaddisconnected
ongamepaddisconnected: (this: WindowEventHandlers, ev: GamepadEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: GamepadEvent) => any | null
繼承自 WindowEventHandlers.ongamepaddisconnected
ongotpointercapture
ongotpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 GlobalEventHandlers.ongotpointercapture
onhashchange
onhashchange: (this: WindowEventHandlers, ev: HashChangeEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: HashChangeEvent) => any | null
繼承自 WindowEventHandlers.onhashchange
oninput
oninput: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.oninput
oninvalid
oninvalid: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.oninvalid
onkeydown
onkeydown: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null
繼承自 GlobalEventHandlers.onkeydown
onkeypress
onkeypress: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null
繼承自 globalEventHandlers.onkeypress
onkeyup
onkeyup: (this: GlobalEventHandlers, ev: KeyboardEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null
繼承自 GlobalEventHandlers.onkeyup
onlanguagechange
onlanguagechange: (this: WindowEventHandlers, ev: Event) => any | null
屬性值
(this: WindowEventHandlers, ev: Event) => any | null
繼承自 WindowEventHandlers.onlanguagechange
onload
onload: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 globalEventHandlers.onload
onloadeddata
onloadeddata: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onloadeddata
onloadedmetadata
onloadedmetadata: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onloadedmetadata
onloadstart
onloadstart: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onloadstart
onlostpointercapture
onlostpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 GlobalEventHandlers.onlostpointercapture
onmessage
onmessage: (this: WindowEventHandlers, ev: MessageEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: MessageEvent) => any | null
繼承自 WindowEventHandlers.onmessage
onmessageerror
onmessageerror: (this: WindowEventHandlers, ev: MessageEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: MessageEvent) => any | null
繼承自 WindowEventHandlers.onmessageerror
onmousedown
onmousedown: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
繼承自 GlobalEventHandlers.onmousedown
onmouseenter
onmouseenter: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
繼承自 GlobalEventHandlers.onmouseenter
onmouseleave
onmouseleave: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
繼承自 GlobalEventHandlers.onmouseleave
onmousemove
onmousemove: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
繼承自 globalEventHandlers.onmousemove
onmouseout
onmouseout: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
繼承自 GlobalEventHandlers.onmouseout
onmouseover
onmouseover: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
繼承自 GlobalEventHandlers.onmouseover
onmouseup
onmouseup: (this: GlobalEventHandlers, ev: MouseEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: MouseEvent) => any | null
繼承自 GlobalEventHandlers.onmouseup
onoffline
onoffline: (this: WindowEventHandlers, ev: Event) => any | null
屬性值
(this: WindowEventHandlers, ev: Event) => any | null
繼承自 WindowEventHandlers.onoffline
ononline
ononline: (this: WindowEventHandlers, ev: Event) => any | null
屬性值
(this: WindowEventHandlers, ev: Event) => any | null
繼承自 WindowEventHandlers.ononline
onpagehide
onpagehide: (this: WindowEventHandlers, ev: PageTransitionEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: PageTransitionEvent) => any | null
繼承自 WindowEventHandlers.onpagehide
onpagereveal
onpagereveal: (this: WindowEventHandlers, ev: PageRevealEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: PageRevealEvent) => any | null
繼承自 WindowEventHandlers.onpagereveal
onpageshow
onpageshow: (this: WindowEventHandlers, ev: PageTransitionEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: PageTransitionEvent) => any | null
繼承自 WindowEventHandlers.onpageshow
onpageswap
onpageswap: (this: WindowEventHandlers, ev: PageSwapEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: PageSwapEvent) => any | null
繼承自 WindowEventHandlers.onpageswap
onpaste
onpaste: (this: GlobalEventHandlers, ev: ClipboardEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null
繼承自 GlobalEventHandlers.onpaste
onpause
onpause: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onpause
onplay
onplay: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 globalEventHandlers.onplay
onplaying
onplaying: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 globalEventHandlers.onplaying
onpointercancel
onpointercancel: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 globalEventHandlers.onpointercancel
onpointerdown
onpointerdown: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 globalEventHandlers.onpointerdown
onpointerenter
onpointerenter: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 GlobalEventHandlers.onpointerenter
onpointerleave
onpointerleave: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 globalEventHandlers.onpointerleave
onpointermove
onpointermove: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 GlobalEventHandlers.onpointermove
onpointerout
onpointerout: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 globalEventHandlers.onpointerout
onpointerover
onpointerover: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 globalEventHandlers.onpointerover
onpointerrawupdate
僅適用於安全內容。
onpointerrawupdate: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onpointerrawupdate
onpointerup
onpointerup: (this: GlobalEventHandlers, ev: PointerEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: PointerEvent) => any | null
繼承自 GlobalEventHandlers.onpointerup
onpopstate
onpopstate: (this: WindowEventHandlers, ev: PopStateEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: PopStateEvent) => any | null
繼承自 WindowEventHandlers.onpopstate
onprogress
onprogress: (this: GlobalEventHandlers, ev: ProgressEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: ProgressEvent) => any | null
繼承自 GlobalEventHandlers.onprogress
onratechange
onratechange: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onratechange
onrejectionhandled
onrejectionhandled: (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: PromiseRejectionEvent) => any | null
繼承自 WindowEventHandlers.onrejectionhandled
onreset
onreset: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onreset
onresize
onresize: (this: GlobalEventHandlers, ev: UIEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: UIEvent) => any | null
繼承自 GlobalEventHandlers.onresize
onscroll
onscroll: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onscroll
onscrollend
onscrollend: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onscrollend
onsecuritypolicyviolation
onsecuritypolicyviolation: (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any | null
繼承自 globalEventHandlers.onsecuritypolicyviolation
onseeked
onseeked: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onseeked
onseeking
onseeking: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onseeking
onselect
onselect: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onselect
onselectionchange
onselectionchange: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onselectionchange
onselectstart
onselectstart: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onselectstart
onslotchange
onslotchange: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onslotchange
onstalled
onstalled: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onstalled
onstorage
onstorage: (this: WindowEventHandlers, ev: StorageEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: StorageEvent) => any | null
繼承自 WindowEventHandlers.onstorage
onsubmit
onsubmit: (this: GlobalEventHandlers, ev: SubmitEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: SubmitEvent) => any | null
繼承自 GlobalEventHandlers.onsubmit
onsuspend
onsuspend: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onsuspend
ontimeupdate
ontimeupdate: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.ontimeupdate
ontoggle
ontoggle: (this: GlobalEventHandlers, ev: ToggleEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: ToggleEvent) => any | null
繼承自 GlobalEventHandlers.ontoggle
ontouchcancel
ontouchcancel?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: TouchEvent) => any | null
繼承自 GlobalEventHandlers.ontouchcancel
ontouchend
ontouchend?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: TouchEvent) => any | null
繼承自 GlobalEventHandlers.ontouchend
ontouchmove
ontouchmove?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: TouchEvent) => any | null
繼承自 GlobalEventHandlers.ontouchmove
ontouchstart
ontouchstart?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: TouchEvent) => any | null
繼承自 GlobalEventHandlers.ontouchstart
ontransitioncancel
ontransitioncancel: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: TransitionEvent) => any | null
繼承自 GlobalEventHandlers.ontransitioncancel
ontransitionend
ontransitionend: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: TransitionEvent) => any | null
繼承自 GlobalEventHandlers.ontransitionend
ontransitionrun
ontransitionrun: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: TransitionEvent) => any | null
繼承自 GlobalEventHandlers.ontransitionrun
ontransitionstart
ontransitionstart: (this: GlobalEventHandlers, ev: TransitionEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: TransitionEvent) => any | null
繼承自 GlobalEventHandlers.ontransitionstart
onunhandledrejection
onunhandledrejection: (this: WindowEventHandlers, ev: PromiseRejectionEvent) => any | null
屬性值
(this: WindowEventHandlers, ev: PromiseRejectionEvent) => any | null
繼承自 WindowEventHandlers.onunhandledrejection
onunload
onunload: (this: WindowEventHandlers, ev: Event) => any | null
屬性值
(this: WindowEventHandlers, ev: Event) => any | null
繼承自 WindowEventHandlers.onunload
onvolumechange
onvolumechange: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 globalEventHandlers.onvolumechange
onwaiting
onwaiting: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onwaiting
onwebkitanimationend
onwebkitanimationend: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 globalEventHandlers.onwebkitanimationend
onwebkitanimationiteration
onwebkitanimationiteration: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 globalEventHandlers.onwebkitanimationiteration
onwebkitanimationstart
onwebkitanimationstart: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 GlobalEventHandlers.onwebkitanimationstart
onwebkittransitionend
onwebkittransitionend: (this: GlobalEventHandlers, ev: Event) => any | null
屬性值
(this: GlobalEventHandlers, ev: Event) => any | null
繼承自 globalEventHandlers.onwebkittransitionend
onwheel
onwheel: (this: GlobalEventHandlers, ev: WheelEvent) => any | null
屬性值
(this: GlobalEventHandlers, ev: WheelEvent) => any | null
繼承自 GlobalEventHandlers.onwheel
origin
performance
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 介面的方法會設定一個函式,當指定事件交付給目標時會被呼叫。
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)
blur()
cancelIdleCallback(number)
此 window.cancelIdleCallback() 方法會取消先前以 window.requestIdleCallback() 排程的回撥。
function cancelIdleCallback(handle: number)
參數
- handle
-
number
captureEvents()
close()
confirm(string)
window.confirm() 指示瀏覽器顯示帶有可選訊息的對話框,並等待使用者確認或取消該對話框。
function confirm(message?: string): boolean
參數
- message
-
string
傳回
boolean
focus()
getComputedStyle(Element, string | null)
Window.getComputedStyle()該方法在套用主動樣式表並解決這些值可能包含的基本運算後,回傳一個包含元素所有 CSS 屬性值的物件。
function getComputedStyle(elt: Element, pseudoElt?: string | null): CSSStyleDeclaration
參數
- elt
-
Element
- pseudoElt
-
string | null
傳回
CSSStyleDeclaration
getSelection()
getSelection()視窗介面的方法會回傳與視窗文件相關的 Selection 物件,代表使用者所選擇的文字範圍或插入點目前的位置。
function getSelection(): Selection | null
傳回
Selection | null
matchMedia(string)
視窗介面的方法會 matchMedia() 回傳一個新的 MediaQueryList 物件,可用來判斷文件是否符合媒體查詢字串,並監控文件以偵測是否匹配(或停止匹配)該媒體查詢。
function matchMedia(query: string): MediaQueryList
參數
- query
-
string
傳回
MediaQueryList
moveBy(number, number)
moveTo(number, number)
open(string | URL, string, string)
postMessage(any, string, Transferable[])
此 window.postMessage() 方法能安全地實現視窗物件間的跨來源通訊; 例如,頁面 與其彈出視窗之間,或頁面與嵌入其中的 iframe 之間。
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()
prompt(string, string)
window.prompt() 指示瀏覽器顯示對話框並附有可選訊息,提示使用者輸入文字,並等待使用者提交文字或取消對話框。
function prompt(message?: string, _default?: string): string | null
參數
- message
-
string
- _default
-
string
傳回
string | null
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() 的事件監聽器。
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() 方法會在瀏覽器閒置期間排隊呼叫函式。
function requestIdleCallback(callback: IdleRequestCallback, options?: IdleRequestOptions): number
參數
- callback
-
IdleRequestCallback
- options
-
IdleRequestOptions
傳回
number
resizeBy(number, number)
此 Window.resizeBy() 方法會將當前視窗調整指定大小。
function resizeBy(x: number, y: number)
參數
- x
-
number
- y
-
number
resizeTo(number, number)
此方法會 Window.resizeTo() 動態調整視窗大小。
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() 視窗捲動至文件中的特定位置。
function scroll(options?: ScrollToOptions)
參數
- options
-
ScrollToOptions
scrollBy(number, number)
function scrollBy(x: number, y: number)
參數
- x
-
number
- y
-
number
scrollBy(ScrollToOptions)
該 Window.scrollBy() 方法會在視窗中依指定長度滾動文件。
function scrollBy(options?: ScrollToOptions)
參數
- options
-
ScrollToOptions
scrollTo(number, number)
function scrollTo(x: number, y: number)
參數
- x
-
number
- y
-
number
scrollTo(ScrollToOptions)
Window.scrollTo() 捲動至文件中特定的座標集合。
function scrollTo(options?: ScrollToOptions)
參數
- options
-
ScrollToOptions
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(number | undefined)
function clearInterval(id: number | undefined)
參數
- id
-
number | undefined
繼承自 WindowOrWorkerGlobalScope.clearInterval
clearTimeout(number | undefined)
function clearTimeout(id: number | undefined)
參數
- id
-
number | undefined
繼承自 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)
dispatchEvent() EventTarget 的方法(同步)向物件發送事件,並以適當順序呼叫受影響的事件監聽者。
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)
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<T>(T, StructuredSerializeOptions)
function structuredClone<T>(value: T, options?: StructuredSerializeOptions): T
參數
- value
-
T
- options
-
StructuredSerializeOptions
傳回
T
繼承自 WindowOrWorkerGlobalScope.structuredClone