Window interface
接口 Window 表示包含 DOM 文档的窗口; document 属性指向在该窗口中加载的 DOM 文档。
- 扩展
-
EventTarget,AnimationFrameProvider,GlobalEventHandlers,WindowEventHandlers,WindowLocalStorage,WindowOrWorkerGlobalScope,WindowSessionStorage
属性
| client |
|
| closed |
|
| cookie |
|
| custom |
|
| device |
|
| document |
|
| event | 只读 Window 属性 |
| external |
|
| frame |
该 |
| frames | 返回窗口本身,该窗口本身是一个类似数组的对象,其中列出了当前窗口的直接子帧。 |
| history |
|
| inner |
包含水平滚动条高度(如果存在)的只读 |
| inner |
只读 Window 属性 |
| length | 返回帧数(帧或 A 数)。 |
| location |
|
| locationbar | 返回 |
| menubar | 返回 |
| ms |
|
| name | 该 |
| navigator |
|
| ondevicemotion | 仅在安全上下文中可用。 |
| ondeviceorientation | 仅在安全上下文中可用。 |
| ondeviceorientationabsolute | 仅在安全上下文中可用。 |
| onorientationchange | |
| opener | Window 接口 |
| orientation | 返回视区相对于设备自然方向的方向(以 90 度递增为单位)。 |
| origin |
|
| outer |
|
| outer |
|
| page |
|
| page |
|
| parent | 该 |
| personalbar | 返回 |
| powerbi | |
| power |
|
| screen | Window 属性 |
| screen |
|
| screen |
|
| screenX |
|
| screenY |
|
| scrollbars | 返回 |
| scrollX | Window 接口的只读 |
| scrollY | Window 接口的只读 |
| self |
|
| speech |
|
| status |
|
| statusbar | 返回 |
| toolbar | 返回 |
| top | 返回对窗口层次结构中最顶层窗口的引用。 |
| visual |
|
| window |
|
继承属性
方法
| add |
|
| add |
|
| alert(any) |
|
| blur() | 该方法 |
| cancel |
该方法 |
| capture |
该方法 |
| close() | 该方法 |
| confirm(string) |
|
| focus() | 发出将窗口置于前面的请求。 |
| get |
该方法 |
| get |
|
| match |
Window 接口 |
| 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
cookieStore Window 接口的只读属性返回对当前文档上下文的 CookieStore 对象的引用。
cookieStore: CookieStore
属性值
CookieStore
customElements
customElements Window 接口的只读属性返回对 CustomElementRegistry 对象的引用,该对象可用于注册新的自定义元素并获取有关以前注册的自定义元素的信息。
customElements: CustomElementRegistry
属性值
CustomElementRegistry
devicePixelRatio
devicePixelRatio Window 接口返回分辨率(以物理像素为单位)与当前显示设备的 CSS 像素分辨率的比率。
devicePixelRatio: number
属性值
number
event
只读 Window 属性 event 返回当前由网站代码处理的事件。
event: Event | undefined
属性值
Event | undefined
external
external Window 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
Window 接口 opener 的属性返回对使用 Window.open 打开窗口的窗口的引用,或通过导航具有 target 属性的链接来打开窗口。
opener: any
属性值
any
orientation
originAgentCluster
originAgentCluster如果此窗口属于源键代理群集,则 Window 接口的只读属性将返回true:这意味着操作系统已向此窗口的源(例如操作系统进程)提供专用资源(例如操作系统进程),而该源未与其他源的窗口共享。
originAgentCluster: boolean
属性值
boolean
outerHeight
Window.outerHeight只读属性返回整个浏览器窗口的高度(以像素为单位),包括任何边栏、窗口部件版式和窗口大小调整边框/句柄。
outerHeight: number
属性值
number
outerWidth
pageXOffset
pageYOffset
personalbar
powerbi
powerBISDKGlobalServiceInstanceName
powerBISDKGlobalServiceInstanceName?: string
属性值
string
screen
screenLeft
screenTop
screenX
screenY
scrollbars
scrollX
scrollY
self
speechSynthesis
speechSynthesis Window 对象的只读属性返回 SpeechSynthesis 对象,该对象是使用 Web 语音 API 语音合成功能的入口点。
speechSynthesis: SpeechSynthesis
属性值
SpeechSynthesis
status
statusbar
toolbar
visualViewport
visualViewport Window 接口的只读属性返回一个 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.onbeforematch
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.onggle
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() Window 接口的方法返回与窗口文档关联的 Selection 对象,该对象表示用户选择的文本范围或插入符号的当前位置。
function getSelection(): Selection | null
返回
Selection | null
matchMedia(string)
Window 接口 matchMedia() 的方法返回一个新的 MediaQueryList 对象,该对象随后可用于确定文档是否与媒体查询字符串匹配,以及监视文档以检测它何时与媒体查询匹配(或停止匹配)。
function matchMedia(query: string): MediaQueryList
参数
- query
-
string
返回
MediaQueryList
moveBy(number, number)
moveTo(number, number)
moveTo() Window 接口的方法将当前窗口移动到指定的坐标。
function moveTo(x: number, y: number)
参数
- x
-
number
- y
-
number
open(string | URL, string, string)
postMessage(any, string, Transferable[])
该方法 window.postMessage() 安全地在 Window 对象之间实现跨源通信; 例如, 在页面和它生成的弹出窗口之间,或在页面和嵌入其中的 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