HTMLIFrameElement interface

提供特殊属性和方法(除了 HTMLElement 接口之外,它还可通过继承使用它)来操作内联框架元素的布局和呈现。

扩展

HTMLElement

属性

align

设置或检索对象与相邻文本的对齐方式。

allow
allowFullscreen
contentDocument

检索页面或框架的文档对象。

contentWindow

检索指定的对象。

frameBorder

设置或检索是否显示框架的边框。

height

设置或检索对象的高度。

longDesc

设置或检索对象的长说明的 URI。

marginHeight

设置或检索顶部和底部边距高度,然后再在框架中显示文本。

marginWidth

在框架中显示文本之前,设置或检索左右边距宽度。

mozRequestFullScreen
msRequestFullscreen
name

设置或检索帧名称。

referrerPolicy
sandbox
scrolling

设置或检索帧是否可以滚动。

src

设置或检索要由对象加载的 URL。

srcdoc

设置或重试要包含的页面的内容。

webkitRequestFullscreen
width

设置或检索对象的宽度。

继承属性

accessKey
accessKeyLabel
ariaAtomic
ariaAutoComplete
ariaBusy
ariaChecked
ariaColCount
ariaColIndex
ariaColIndexText
ariaColSpan
ariaCurrent
ariaDisabled
ariaExpanded
ariaHasPopup
ariaHidden
ariaInvalid
ariaKeyShortcuts
ariaLabel
ariaLevel
ariaLive
ariaModal
ariaMultiLine
ariaMultiSelectable
ariaOrientation
ariaPlaceholder
ariaPosInSet
ariaPressed
ariaReadOnly
ariaRequired
ariaRoleDescription
ariaRowCount
ariaRowIndex
ariaRowIndexText
ariaRowSpan
ariaSelected
ariaSetSize
ariaSort
ariaValueMax
ariaValueMin
ariaValueNow
ariaValueText
assignedSlot
attributes
ATTRIBUTE_NODE
autocapitalize
autofocus
baseURI

返回节点的节点文档的文档基 URL。

CDATA_SECTION_NODE

节点是 CDATASection 节点。

childElementCount
childNodes

返回子级。

children

返回子元素。

classList

允许通过 DOMTokenList 对象将元素的类内容属性作为一组空格分隔的标记进行操作。

className

返回元素的类内容属性的值。 可以设置为更改它。

clientHeight
clientLeft
clientTop
clientWidth
COMMENT_NODE

节点是注释节点。

contentEditable
dataset
dir
DOCUMENT_FRAGMENT_NODE

节点是 DocumentFragment 节点。

DOCUMENT_NODE

节点是文档。

DOCUMENT_POSITION_CONTAINED_BY

当其他节点是节点的后代时设置。

DOCUMENT_POSITION_CONTAINS

当其他节点是节点的上级时设置。

DOCUMENT_POSITION_DISCONNECTED

当节点和其他节点不在同一树中时设置。

DOCUMENT_POSITION_FOLLOWING

当其他节点位于以下节点时设置。

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
DOCUMENT_POSITION_PRECEDING

设置其他节点之前的节点。

DOCUMENT_TYPE_NODE

node 是 doctype。

draggable
ELEMENT_NODE

node 是一个元素。

enterKeyHint
ENTITY_NODE
ENTITY_REFERENCE_NODE
firstChild

返回第一个子级。

firstElementChild

返回作为元素的第一个子级,否则返回 null。

hidden
id

返回元素 ID 内容属性的值。 可以设置为更改它。

inert
innerHTML
innerText
inputMode
isConnected

如果节点已连接,则返回 true;否则返回 false。

isContentEditable
lang
lastChild

返回最后一个子级。

lastElementChild

返回作为元素的最后一个子级,否则返回 null。

localName

返回本地名称。

namespaceURI

返回命名空间。

nextElementSibling

返回作为元素的第一个同级,否则返回 null。

nextSibling

返回下一个同级。

nodeName

返回适用于节点类型的字符串。

nodeType

返回节点的类型。

nodeValue
nonce
NOTATION_NODE
offsetHeight
offsetLeft
offsetParent
offsetTop
offsetWidth
onabort

当用户中止下载时触发。

onanimationcancel
onanimationend
onanimationiteration
onanimationstart
onauxclick
onbeforeinput
onblur

当对象失去输入焦点时触发。

oncancel
oncanplay

在可能播放时发生,但需要进一步缓冲。

oncanplaythrough
onchange

当对象或所选内容发生更改时触发。

onclick

当用户单击对象上的鼠标左键时触发

onclose
oncontextmenu

当用户在工作区中单击鼠标右键时触发,打开上下文菜单。

oncopy
oncuechange
oncut
ondblclick

当用户双击对象时触发。

ondrag

在拖动操作期间持续触发源对象。

ondragend

当用户在拖动操作关闭时释放鼠标时,会触发源对象。

ondragenter

当用户将对象拖动到有效的放置目标时,将触发目标元素。

ondragleave

当用户在拖动操作期间将鼠标移出有效放置目标时,会触发目标对象。

ondragover

当用户将对象拖动到有效的放置目标上时,会持续触发目标元素。

ondragstart

当用户开始拖动文本选择或所选对象时,将触发源对象。

ondrop
ondurationchange

在更新持续时间属性时发生。

onemptied

当媒体元素重置为其初始状态时发生。

onended

到达播放结束时发生。

onerror

在对象加载期间发生错误时触发。

onfocus

当对象收到焦点时触发。

onformdata
onfullscreenchange
onfullscreenerror
ongotpointercapture
oninput
oninvalid
onkeydown

当用户按下键时触发。

onkeypress

当用户按下字母数字键时触发。

onkeyup

当用户释放密钥时触发。

onload

在浏览器加载对象后立即触发。

onloadeddata

在当前播放位置加载媒体数据时发生。

onloadedmetadata

在确定媒体的持续时间和维度时发生。

onloadstart

当 Internet Explorer 开始查找媒体数据时发生。

onlostpointercapture
onmousedown

当用户使用任一鼠标按钮单击对象时触发。

onmouseenter
onmouseleave
onmousemove

当用户将鼠标移到对象上时触发。

onmouseout

当用户将鼠标指针移到对象的边界之外时触发。

onmouseover

当用户将鼠标指针移到对象中时触发。

onmouseup

当用户在鼠标悬停在对象上时释放鼠标按钮时触发。

onpaste
onpause

暂停播放时发生。

onplay

请求 play 方法时发生。

onplaying

当音频或视频开始播放时发生。

onpointercancel
onpointerdown
onpointerenter
onpointerleave
onpointermove
onpointerout
onpointerover
onpointerup
onprogress

在下载媒体数据时发生指示进度。

onratechange

当播放速率增加或减少时发生。

onreset

当用户重置窗体时触发。

onresize
onscroll

当用户在对象的滚动条中重新定位滚动框时触发。

onsecuritypolicyviolation
onseeked

在搜寻操作结束时发生。

onseeking

移动当前播放位置时发生。

onselect

当当前所选内容更改时触发。

onselectionchange
onselectstart
onslotchange
onstalled

下载停止时发生。

onsubmit
onsuspend

如果加载操作已有意停止,则发生此情况。

ontimeupdate

发生以指示当前播放位置。

ontoggle
ontouchcancel
ontouchend
ontouchmove
ontouchstart
ontransitioncancel
ontransitionend
ontransitionrun
ontransitionstart
onvolumechange

更改音量或播放静音或取消静音时发生。

onwaiting

播放停止时发生,因为视频资源的下一帧不可用。

onwebkitanimationend
onwebkitanimationiteration
onwebkitanimationstart
onwebkittransitionend
onwheel
outerHTML
outerText
ownerDocument
parentElement

返回父元素。

parentNode

返回父级。

part
prefix

返回命名空间前缀。

previousElementSibling

返回前一个是元素的同级,否则返回 null。

previousSibling

返回上一个同级。

PROCESSING_INSTRUCTION_NODE

节点是 ProcessingInstruction 节点。

role
scrollHeight
scrollLeft
scrollTop
scrollWidth
shadowRoot

返回元素的阴影根(如果有)以及阴影根的模式为“open”,否则返回 null。

slot

返回元素的槽内容属性的值。 可以设置为更改它。

spellcheck
style
tabIndex
tagName

返回 HTML 大写的限定名称。

textContent
TEXT_NODE

节点是文本节点。

title
translate

方法

addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)
addEventListener<K>(K, (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, boolean | AddEventListenerOptions)
getSVGDocument()
removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)
removeEventListener<K>(K, (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, boolean | EventListenerOptions)

继承的方法

after((string | Node)[])

在节点之后插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

animate(null | Keyframe[] | PropertyIndexedKeyframes, number | KeyframeAnimationOptions)
append((string | Node)[])

在节点的最后一个子级之后插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

appendChild<T>(T)
attachInternals()
attachShadow(ShadowRootInit)

为元素创建阴影根并返回它。

before((string | Node)[])

在节点之前插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

blur()
click()
cloneNode(boolean)

返回节点的副本。 如果深度为 true,则副本还包括节点的后代。

closest<E>(string)
closest<K>(K)

返回与选择器匹配的第一个(从元素开始)非独占上级,否则返回 null。

closest<K>(K)
compareDocumentPosition(Node)

返回一个位掩码,指示相对于节点的其他位置。

contains(null | Node)

如果另一个是节点的非独占后代,则返回 true;否则返回 false。

dispatchEvent(Event)

如果事件的可取消属性值为 false 或其 preventDefault() 方法未调用,则调度合成事件事件的目标并返回 true;否则返回 false。

focus(FocusOptions)
getAnimations(GetAnimationsOptions)
getAttribute(string)

返回元素的第一个属性,其限定名称为 qualifiedName,如果没有此类属性,则返回 null。

getAttributeNames()

返回所有元素属性的限定名称。 可以包含重复项。

getAttributeNode(string)
getAttributeNodeNS(null | string, string)
getAttributeNS(null | string, string)

返回命名空间为命名空间且本地名称为 localName 的元素属性,如果没有此类属性,则返回 null。

getBoundingClientRect()
getClientRects()
getElementsByClassName(string)

返回调用方法的对象(文档或元素)中具有 classNames 提供的所有类的元素的 HTMLCollection。 classNames 参数被解释为以空格分隔的类列表。

getElementsByTagName(string)
getElementsByTagName<K>(K)
getElementsByTagName<K>(K)
getElementsByTagNameNS("http://www.w3.org/1999/xhtml", string)
getElementsByTagNameNS("http://www.w3.org/2000/svg", string)
getElementsByTagNameNS(null | string, string)
getRootNode(GetRootNodeOptions)

返回节点的根。

hasAttribute(string)

如果元素具有其限定名称为 qualifiedName 的属性,则返回 true;否则返回 false。

hasAttributeNS(null | string, string)

如果元素具有命名空间为命名空间且本地名称为 localName 的属性,则返回 true。

hasAttributes()

如果元素具有属性,则返回 true;否则返回 false。

hasChildNodes()

返回节点是否具有子级。

hasPointerCapture(number)
insertAdjacentElement(InsertPosition, Element)
insertAdjacentHTML(InsertPosition, string)
insertAdjacentText(InsertPosition, string)
insertBefore<T>(T, null | Node)
isDefaultNamespace(null | string)
isEqualNode(null | Node)

返回节点和其他Node 是否具有相同的属性。

isSameNode(null | Node)
lookupNamespaceURI(null | string)
lookupPrefix(null | string)
matches(string)

如果匹配选择器与元素的根生成元素匹配,则返回 true;否则返回 false。

normalize()

删除空的独占文本节点,并将剩余连续独占文本节点的数据串联到其第一个节点中。

prepend((string | Node)[])

在节点的第一个子级之前插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

querySelector<E>(string)
querySelector<K>(K)

返回与选择器匹配的节点后代的第一个元素。

querySelector<K>(K)
querySelectorAll<E>(string)
querySelectorAll<K>(K)

返回与选择器匹配的节点的所有元素后代。

querySelectorAll<K>(K)
releasePointerCapture(number)
remove()

删除节点。

removeAttribute(string)

删除其限定名称为 qualifiedName 的元素的第一个属性。

removeAttributeNode(Attr)
removeAttributeNS(null | string, string)

删除命名空间为命名空间且本地名称为 localName 的元素属性。

removeChild<T>(T)
replaceChild<T>(Node, T)
replaceChildren((string | Node)[])

将节点的所有子级替换为节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

replaceWith((string | Node)[])

将节点替换为节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

requestFullscreen(FullscreenOptions)

显示元素全屏,并在完成后解析承诺。

提供时,选项的 navigationUI 成员指示是否在全屏显示导航 UI 是首选的。 如果设置为“show”,则导航简单性优先于屏幕空间,如果设置为“隐藏”,则首选更多屏幕空间。 用户代理始终可以自由地遵循用户对应用程序的偏好。 默认值“auto”表示没有应用程序首选项。

requestPointerLock()
scroll(number, number)
scroll(ScrollToOptions)
scrollBy(number, number)
scrollBy(ScrollToOptions)
scrollIntoView(boolean | ScrollIntoViewOptions)
scrollTo(number, number)
scrollTo(ScrollToOptions)
setAttribute(string, string)

将限定名称为 qualifiedName 的元素的第一个特性的值设置为值。

setAttributeNode(Attr)
setAttributeNodeNS(Attr)
setAttributeNS(null | string, string, string)

将命名空间为命名空间且本地名称为 localName 的元素属性的值设置为值。

setPointerCapture(number)
toggleAttribute(string, boolean)

如果未指定 force,则为“toggles”qualifiedName,如果存在,则将其删除,如果不存在,则将其添加。 如果 force 为 true,则添加 qualifiedName。 如果 force 为 false,则删除 qualifiedName。

如果 qualifiedName 现在存在,则返回 true;否则返回 false。

webkitMatchesSelector(string)

属性详细信息

align

警告

现已弃用此 API。

设置或检索对象与相邻文本的对齐方式。

align: string

属性值

string

allow

allow: string

属性值

string

allowFullscreen

allowFullscreen: boolean

属性值

boolean

contentDocument

检索页面或框架的文档对象。

contentDocument: null | Document

属性值

null | Document

contentWindow

检索指定的对象。

contentWindow: null | Window

属性值

null | Window

frameBorder

警告

现已弃用此 API。

设置或检索是否显示框架的边框。

frameBorder: string

属性值

string

height

设置或检索对象的高度。

height: string

属性值

string

longDesc

警告

现已弃用此 API。

设置或检索对象的长说明的 URI。

longDesc: string

属性值

string

marginHeight

警告

现已弃用此 API。

设置或检索顶部和底部边距高度,然后再在框架中显示文本。

marginHeight: string

属性值

string

marginWidth

警告

现已弃用此 API。

在框架中显示文本之前,设置或检索左右边距宽度。

marginWidth: string

属性值

string

mozRequestFullScreen

mozRequestFullScreen: Function

属性值

Function

msRequestFullscreen

msRequestFullscreen: Function

属性值

Function

name

设置或检索帧名称。

name: string

属性值

string

referrerPolicy

referrerPolicy: ReferrerPolicy

属性值

ReferrerPolicy

sandbox

sandbox: DOMTokenList

属性值

DOMTokenList

scrolling

警告

现已弃用此 API。

设置或检索帧是否可以滚动。

scrolling: string

属性值

string

src

设置或检索要由对象加载的 URL。

src: string

属性值

string

srcdoc

设置或重试要包含的页面的内容。

srcdoc: string

属性值

string

webkitRequestFullscreen

webkitRequestFullscreen: () => void

属性值

() => void

width

设置或检索对象的宽度。

width: string

属性值

string

继承属性详细信息

accessKey

accessKey: string

属性值

string

继承自 HTMLElement.accessKey

accessKeyLabel

accessKeyLabel: string

属性值

string

继承自 HTMLElement.accessKeyLabel

ariaAtomic

ariaAtomic: null | string

属性值

null | string

继承自 HTMLElement.ariaAtomic

ariaAutoComplete

ariaAutoComplete: null | string

属性值

null | string

继承自 HTMLElement.ariaAutoComplete

ariaBusy

ariaBusy: null | string

属性值

null | string

继承自 HTMLElement.ariaBusy

ariaChecked

ariaChecked: null | string

属性值

null | string

继承自 HTMLElement.ariaChecked

ariaColCount

ariaColCount: null | string

属性值

null | string

继承自 HTMLElement.ariaColCount

ariaColIndex

ariaColIndex: null | string

属性值

null | string

继承自 HTMLElement.ariaColIndex

ariaColIndexText

ariaColIndexText: null | string

属性值

null | string

继承自 HTMLElement.ariaColIndexText

ariaColSpan

ariaColSpan: null | string

属性值

null | string

继承自 HTMLElement.ariaColSpan

ariaCurrent

ariaCurrent: null | string

属性值

null | string

继承自 HTMLElement.ariaCurrent

ariaDisabled

ariaDisabled: null | string

属性值

null | string

继承自 HTMLElement.ariaDisabled

ariaExpanded

ariaExpanded: null | string

属性值

null | string

继承自 HTMLElement.ariaExpanded

ariaHasPopup

ariaHasPopup: null | string

属性值

null | string

继承自 HTMLElement.ariaHasPopup

ariaHidden

ariaHidden: null | string

属性值

null | string

继承自 HTMLElement.ariaHidden

ariaInvalid

ariaInvalid: null | string

属性值

null | string

继承自 HTMLElement.ariaInvalid

ariaKeyShortcuts

ariaKeyShortcuts: null | string

属性值

null | string

继承自 HTMLElement.ariaKeyShortcuts

ariaLabel

ariaLabel: null | string

属性值

null | string

继承自 HTMLElement.ariaLabel

ariaLevel

ariaLevel: null | string

属性值

null | string

继承自 HTMLElement.ariaLevel

ariaLive

ariaLive: null | string

属性值

null | string

继承自 HTMLElement.ariaLive

ariaModal

ariaModal: null | string

属性值

null | string

继承自 HTMLElement.ariaModal

ariaMultiLine

ariaMultiLine: null | string

属性值

null | string

继承自 HTMLElement.ariaMultiLine

ariaMultiSelectable

ariaMultiSelectable: null | string

属性值

null | string

继承自 HTMLElement.ariaMultiSelectable

ariaOrientation

ariaOrientation: null | string

属性值

null | string

继承自 HTMLElement.ariaOrientation

ariaPlaceholder

ariaPlaceholder: null | string

属性值

null | string

继承自 HTMLElement.ariaPlaceholder

ariaPosInSet

ariaPosInSet: null | string

属性值

null | string

继承自 HTMLElement.ariaPosInSet

ariaPressed

ariaPressed: null | string

属性值

null | string

继承自 HTMLElement.ariaPressed

ariaReadOnly

ariaReadOnly: null | string

属性值

null | string

继承自 HTMLElement.ariaReadOnly

ariaRequired

ariaRequired: null | string

属性值

null | string

继承自 HTMLElement.ariaRequired

ariaRoleDescription

ariaRoleDescription: null | string

属性值

null | string

继承自 HTMLElement.ariaRoleDescription

ariaRowCount

ariaRowCount: null | string

属性值

null | string

继承自 HTMLElement.ariaRowCount

ariaRowIndex

ariaRowIndex: null | string

属性值

null | string

继承自 HTMLElement.ariaRowIndex

ariaRowIndexText

ariaRowIndexText: null | string

属性值

null | string

继承自 HTMLElement.ariaRowIndexText

ariaRowSpan

ariaRowSpan: null | string

属性值

null | string

继承自 HTMLElement.ariaRowSpan

ariaSelected

ariaSelected: null | string

属性值

null | string

继承自 HTMLElement.ariaSelected

ariaSetSize

ariaSetSize: null | string

属性值

null | string

继承自 HTMLElement.ariaSetSize

ariaSort

ariaSort: null | string

属性值

null | string

继承自 HTMLElement.ariaSort

ariaValueMax

ariaValueMax: null | string

属性值

null | string

继承自 HTMLElement.ariaValueMax

ariaValueMin

ariaValueMin: null | string

属性值

null | string

继承自 HTMLElement.ariaValueMin

ariaValueNow

ariaValueNow: null | string

属性值

null | string

继承自 HTMLElement.ariaValueNow

ariaValueText

ariaValueText: null | string

属性值

null | string

继承自 HTMLElement.ariaValueText

assignedSlot

assignedSlot: null | HTMLSlotElement

属性值

null | HTMLSlotElement

继承自 HTMLElement.assignedSlot

attributes

attributes: NamedNodeMap

属性值

NamedNodeMap

继承自 HTMLElement.attributes

ATTRIBUTE_NODE

ATTRIBUTE_NODE: number

属性值

number

继承自 HTMLElement.ATTRIBUTE_NODE 的

autocapitalize

autocapitalize: string

属性值

string

继承自 HTMLElement.autocapitalize

autofocus

autofocus: boolean

属性值

boolean

继承自 HTMLElement.autofocus

baseURI

返回节点的节点文档的文档基 URL。

baseURI: string

属性值

string

继承自 HTMLElement.baseURI

CDATA_SECTION_NODE

节点是 CDATASection 节点。

CDATA_SECTION_NODE: number

属性值

number

继承自 HTMLElement.CDATA_SECTION_NODE 的

childElementCount

childElementCount: number

属性值

number

继承自 HTMLElement.childElementCount

childNodes

返回子级。

childNodes: NodeListOf<ChildNode>

属性值

NodeListOf<ChildNode>

继承自 HTMLElement.childNodes

children

返回子元素。

children: HTMLCollection

属性值

HTMLCollection

继承自 HTMLElement.children

classList

允许通过 DOMTokenList 对象将元素的类内容属性作为一组空格分隔的标记进行操作。

classList: DOMTokenList

属性值

DOMTokenList

继承自 HTMLElement.classList

className

返回元素的类内容属性的值。 可以设置为更改它。

className: string

属性值

string

继承自 HTMLElement.className

clientHeight

clientHeight: number

属性值

number

继承自 HTMLElement.clientHeight

clientLeft

clientLeft: number

属性值

number

继承自 HTMLElement.clientLeft

clientTop

clientTop: number

属性值

number

继承自 HTMLElement.clientTop

clientWidth

clientWidth: number

属性值

number

继承自 HTMLElement.clientWidth

COMMENT_NODE

节点是注释节点。

COMMENT_NODE: number

属性值

number

继承自 HTMLElement.COMMENT_NODE 的

contentEditable

contentEditable: string

属性值

string

继承自 HTMLElement.contentEditable

dataset

dataset: DOMStringMap

属性值

DOMStringMap

继承自 HTMLElement.dataset

dir

dir: string

属性值

string

继承自 HTMLElement.dir

DOCUMENT_FRAGMENT_NODE

节点是 DocumentFragment 节点。

DOCUMENT_FRAGMENT_NODE: number

属性值

number

继承自 HTMLElement.DOCUMENT_FRAGMENT_NODE 的

DOCUMENT_NODE

节点是文档。

DOCUMENT_NODE: number

属性值

number

继承自 HTMLElement.DOCUMENT_NODE 的

DOCUMENT_POSITION_CONTAINED_BY

当其他节点是节点的后代时设置。

DOCUMENT_POSITION_CONTAINED_BY: number

属性值

number

继承自 HTMLElement.DOCUMENT_POSITION_CONTAINED_BY 的

DOCUMENT_POSITION_CONTAINS

当其他节点是节点的上级时设置。

DOCUMENT_POSITION_CONTAINS: number

属性值

number

继承自 HTMLElement.DOCUMENT_POSITION_CONTAINS 的

DOCUMENT_POSITION_DISCONNECTED

当节点和其他节点不在同一树中时设置。

DOCUMENT_POSITION_DISCONNECTED: number

属性值

number

继承自 HTMLElement.DOCUMENT_POSITION_DISCONNECTED 的

DOCUMENT_POSITION_FOLLOWING

当其他节点位于以下节点时设置。

DOCUMENT_POSITION_FOLLOWING: number

属性值

number

继承自 HTMLElement.DOCUMENT_POSITION_FOLLOWING 的

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number

属性值

number

继承自 HTMLElement.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC 的

DOCUMENT_POSITION_PRECEDING

设置其他节点之前的节点。

DOCUMENT_POSITION_PRECEDING: number

属性值

number

继承自 HTMLElement.DOCUMENT_POSITION_PRECEDING 的

DOCUMENT_TYPE_NODE

node 是 doctype。

DOCUMENT_TYPE_NODE: number

属性值

number

继承自 HTMLElement.DOCUMENT_TYPE_NODE 的

draggable

draggable: boolean

属性值

boolean

继承自 HTMLElement.draggable

ELEMENT_NODE

node 是一个元素。

ELEMENT_NODE: number

属性值

number

继承自 HTMLElement.ELEMENT_NODE 的

enterKeyHint

enterKeyHint: string

属性值

string

继承自 HTMLElement.enterKeyHint

ENTITY_NODE

ENTITY_NODE: number

属性值

number

继承自 HTMLElement.ENTITY_NODE

ENTITY_REFERENCE_NODE

ENTITY_REFERENCE_NODE: number

属性值

number

继承自 HTMLElement.ENTITY_REFERENCE_NODE 的

firstChild

返回第一个子级。

firstChild: null | ChildNode

属性值

null | ChildNode

继承自 HTMLElement.firstChild

firstElementChild

返回作为元素的第一个子级,否则返回 null。

firstElementChild: null | Element

属性值

null | Element

继承自 HTMLElement.firstElementChild

hidden

hidden: boolean

属性值

boolean

继承自 HTMLElement.hidden

id

返回元素 ID 内容属性的值。 可以设置为更改它。

id: string

属性值

string

继承自 HTMLElement.id 的

inert

inert: boolean

属性值

boolean

继承自 HTMLElement.inert

innerHTML

innerHTML: string

属性值

string

继承自 HTMLElement.innerHTML

innerText

innerText: string

属性值

string

继承自 HTMLElement.innerText

inputMode

inputMode: string

属性值

string

继承自 HTMLElement.inputMode

isConnected

如果节点已连接,则返回 true;否则返回 false。

isConnected: boolean

属性值

boolean

继承自 HTMLElement.isConnected

isContentEditable

isContentEditable: boolean

属性值

boolean

继承自 HTMLElement.isContentEditable

lang

lang: string

属性值

string

继承自 HTMLElement.lang

lastChild

返回最后一个子级。

lastChild: null | ChildNode

属性值

null | ChildNode

继承自 HTMLElement.lastChild

lastElementChild

返回作为元素的最后一个子级,否则返回 null。

lastElementChild: null | Element

属性值

null | Element

继承自 HTMLElement.lastElementChild

localName

返回本地名称。

localName: string

属性值

string

继承自 HTMLElement.localName

namespaceURI

返回命名空间。

namespaceURI: null | string

属性值

null | string

继承自 HTMLElement.namespaceURI

nextElementSibling

返回作为元素的第一个同级,否则返回 null。

nextElementSibling: null | Element

属性值

null | Element

继承自 HTMLElement.nextElementSibling

nextSibling

返回下一个同级。

nextSibling: null | ChildNode

属性值

null | ChildNode

继承自 HTMLElement.nextSibling

nodeName

返回适用于节点类型的字符串。

nodeName: string

属性值

string

继承自 HTMLElement.nodeName

nodeType

返回节点的类型。

nodeType: number

属性值

number

继承自 HTMLElement.nodeType

nodeValue

nodeValue: null | string

属性值

null | string

继承自 HTMLElement.nodeValue

nonce

nonce?: string

属性值

string

继承自 HTMLElement.nonce

NOTATION_NODE

NOTATION_NODE: number

属性值

number

继承自 HTMLElement.NOTATION_NODE 的

offsetHeight

offsetHeight: number

属性值

number

继承自 HTMLElement.offsetHeight

offsetLeft

offsetLeft: number

属性值

number

继承自 HTMLElement.offsetLeft

offsetParent

offsetParent: null | Element

属性值

null | Element

继承自 HTMLElement.offsetParent

offsetTop

offsetTop: number

属性值

number

继承自 HTMLElement.offsetTop

offsetWidth

offsetWidth: number

属性值

number

继承自 HTMLElement.offsetWidth

onabort

当用户中止下载时触发。

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

属性值

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

继承自 HTMLElement.onabort

onanimationcancel

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

属性值

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

继承自 HTMLElement.onanimationcancel

onanimationend

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

属性值

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

继承自 HTMLElement.onanimationend

onanimationiteration

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

属性值

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

继承自 HTMLElement.onanimationiteration

onanimationstart

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

属性值

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

继承自 HTMLElement.onanimationstart

onauxclick

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

属性值

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

继承自 HTMLElement.onauxclick

onbeforeinput

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

属性值

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

继承自 HTMLElement.onbeforeinput

onblur

当对象失去输入焦点时触发。

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

属性值

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

继承自 HTMLElement.onblur

oncancel

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

属性值

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

继承自 HTMLElement.oncancel

oncanplay

在可能播放时发生,但需要进一步缓冲。

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

属性值

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

继承自 HTMLElement.oncanplay

oncanplaythrough

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

属性值

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

继承自 HTMLElement.oncanplaythrough

onchange

当对象或所选内容发生更改时触发。

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

属性值

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

继承自 HTMLElement.onchange

onclick

当用户单击对象上的鼠标左键时触发

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

属性值

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

继承自 HTMLElement.onclick

onclose

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

属性值

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

继承自 HTMLElement.onclose

oncontextmenu

当用户在工作区中单击鼠标右键时触发,打开上下文菜单。

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

属性值

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

继承自 HTMLElement.oncontextmenu

oncopy

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

属性值

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

继承自 HTMLElement.oncopy

oncuechange

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

属性值

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

继承自 HTMLElement.oncuechange

oncut

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

属性值

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

继承自 HTMLElement.oncut

ondblclick

当用户双击对象时触发。

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

属性值

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

继承自 HTMLElement.ondblclick

ondrag

在拖动操作期间持续触发源对象。

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

属性值

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

继承自 HTMLElement.ondrag

ondragend

当用户在拖动操作关闭时释放鼠标时,会触发源对象。

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

属性值

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

继承自 HTMLElement.ondragend

ondragenter

当用户将对象拖动到有效的放置目标时,将触发目标元素。

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

属性值

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

继承自 HTMLElement.ondragenter

ondragleave

当用户在拖动操作期间将鼠标移出有效放置目标时,会触发目标对象。

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

属性值

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

继承自 HTMLElement.ondragleave

ondragover

当用户将对象拖动到有效的放置目标上时,会持续触发目标元素。

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

属性值

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

继承自 HTMLElement.ondragover

ondragstart

当用户开始拖动文本选择或所选对象时,将触发源对象。

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

属性值

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

继承自 HTMLElement.ondragstart

ondrop

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

属性值

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

继承自 HTMLElement.ondrop

ondurationchange

在更新持续时间属性时发生。

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

属性值

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

继承自 HTMLElement.ondurationchange

onemptied

当媒体元素重置为其初始状态时发生。

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

属性值

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

继承自 HTMLElement.onemptied

onended

到达播放结束时发生。

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

属性值

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

继承自 HTMLElement.onended

onerror

在对象加载期间发生错误时触发。

onerror: OnErrorEventHandler

属性值

OnErrorEventHandler

继承自 HTMLElement.onerror

onfocus

当对象收到焦点时触发。

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

属性值

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

继承自 HTMLElement.onfocus

onformdata

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

属性值

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

继承自 HTMLElement.onformdata

onfullscreenchange

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

属性值

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

继承自 HTMLElement.onfullscreenchange

onfullscreenerror

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

属性值

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

继承自 HTMLElement.onfullscreenerror

ongotpointercapture

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

属性值

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

继承自 HTMLElement.ongotpointercapture

oninput

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

属性值

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

继承自 HTMLElement.oninput

oninvalid

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

属性值

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

继承自 HTMLElement.oninvalid

onkeydown

当用户按下键时触发。

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

属性值

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

继承自 HTMLElement.onkeydown

onkeypress

警告

现已弃用此 API。

当用户按下字母数字键时触发。

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

属性值

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

继承自 HTMLElement.onkeypress

onkeyup

当用户释放密钥时触发。

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

属性值

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

继承自 HTMLElement.onkeyup

onload

在浏览器加载对象后立即触发。

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

属性值

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

继承自 HTMLElement.onload

onloadeddata

在当前播放位置加载媒体数据时发生。

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

属性值

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

继承自 HTMLElement.onloadeddata

onloadedmetadata

在确定媒体的持续时间和维度时发生。

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

属性值

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

继承自 HTMLElement.onloadedmetadata

onloadstart

当 Internet Explorer 开始查找媒体数据时发生。

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

属性值

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

继承自 HTMLElement.onloadstart

onlostpointercapture

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

属性值

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

继承自 HTMLElement.onlostpointercapture

onmousedown

当用户使用任一鼠标按钮单击对象时触发。

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

属性值

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

继承自 HTMLElement.onmousedown

onmouseenter

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

属性值

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

继承自 HTMLElement.onmouseenter

onmouseleave

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

属性值

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

继承自 HTMLElement.onmouseleave

onmousemove

当用户将鼠标移到对象上时触发。

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

属性值

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

继承自 HTMLElement.onmousemove

onmouseout

当用户将鼠标指针移到对象的边界之外时触发。

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

属性值

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

继承自 HTMLElement.onmouseout

onmouseover

当用户将鼠标指针移到对象中时触发。

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

属性值

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

继承自 HTMLElement.onmouseover

onmouseup

当用户在鼠标悬停在对象上时释放鼠标按钮时触发。

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

属性值

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

继承自 HTMLElement.onmouseup

onpaste

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

属性值

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

继承自 HTMLElement.onpaste

onpause

暂停播放时发生。

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

属性值

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

继承自 HTMLElement.onpause

onplay

请求 play 方法时发生。

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

属性值

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

继承自 HTMLElement.onplay

onplaying

当音频或视频开始播放时发生。

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

属性值

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

继承自 HTMLElement.onplaying

onpointercancel

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

属性值

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

继承自 HTMLElement.onpointercancel

onpointerdown

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

属性值

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

继承自 HTMLElement.onpointerdown

onpointerenter

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

属性值

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

继承自 HTMLElement.onpointerenter

onpointerleave

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

属性值

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

继承自 HTMLElement.onpointerleave

onpointermove

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

属性值

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

继承自 HTMLElement.onpointermove

onpointerout

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

属性值

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

继承自 HTMLElement.onpointerout

onpointerover

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

属性值

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

继承自 HTMLElement.onpointerover

onpointerup

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

属性值

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

继承自 HTMLElement.onpointerup

onprogress

在下载媒体数据时发生指示进度。

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

属性值

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

继承自 HTMLElement.onprogress 的

onratechange

当播放速率增加或减少时发生。

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

属性值

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

继承自 HTMLElement.onratechange

onreset

当用户重置窗体时触发。

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

属性值

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

继承自 HTMLElement.onreset

onresize

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

属性值

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

继承自 HTMLElement.onresize

onscroll

当用户在对象的滚动条中重新定位滚动框时触发。

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

属性值

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

继承自 HTMLElement.onscroll

onsecuritypolicyviolation

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

属性值

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

继承自 HTMLElement.onsecuritypolicyviolation

onseeked

在搜寻操作结束时发生。

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

属性值

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

继承自 HTMLElement.onseeked

onseeking

移动当前播放位置时发生。

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

属性值

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

继承自 HTMLElement.onseeking

onselect

当当前所选内容更改时触发。

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

属性值

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

继承自 HTMLElement.onselect

onselectionchange

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

属性值

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

继承自 HTMLElement.onselectionchange

onselectstart

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

属性值

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

继承自 HTMLElement.onselectstart

onslotchange

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

属性值

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

继承自 HTMLElement.onslotchange

onstalled

下载停止时发生。

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

属性值

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

继承自 HTMLElement.onstalled

onsubmit

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

属性值

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

继承自 HTMLElement.onsubmit

onsuspend

如果加载操作已有意停止,则发生此情况。

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

属性值

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

继承自 HTMLElement.onsuspend

ontimeupdate

发生以指示当前播放位置。

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

属性值

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

继承自 HTMLElement.ontimeupdate

ontoggle

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

属性值

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

继承自 HTMLElement.onggle

ontouchcancel

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

属性值

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

继承自 HTMLElement.ontouchcancel

ontouchend

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

属性值

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

继承自 HTMLElement.ontouchend

ontouchmove

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

属性值

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

继承自 HTMLElement.ontouchmove

ontouchstart

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

属性值

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

继承自 HTMLElement.ontouchstart

ontransitioncancel

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

属性值

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

继承自 HTMLElement.ontransitioncancel

ontransitionend

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

属性值

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

继承自 HTMLElement.ontransitionend

ontransitionrun

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

属性值

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

继承自 HTMLElement.ontransitionrun

ontransitionstart

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

属性值

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

继承自 HTMLElement.ontransitionstart

onvolumechange

更改音量或播放静音或取消静音时发生。

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

属性值

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

继承自 HTMLElement.onvolumechange

onwaiting

播放停止时发生,因为视频资源的下一帧不可用。

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

属性值

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

继承自 HTMLElement.onwaiting

onwebkitanimationend

警告

现已弃用此 API。

This is a legacy alias of onanimationend.

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

属性值

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

继承自 HTMLElement.onwebkitanimationend

onwebkitanimationiteration

警告

现已弃用此 API。

This is a legacy alias of onanimationiteration.

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

属性值

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

继承自 HTMLElement.onwebkitanimationiteration

onwebkitanimationstart

警告

现已弃用此 API。

This is a legacy alias of onanimationstart.

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

属性值

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

继承自 HTMLElement.onwebkitanimationstart

onwebkittransitionend

警告

现已弃用此 API。

This is a legacy alias of ontransitionend.

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

属性值

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

继承自 HTMLElement.onwebkittransitionend

onwheel

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

属性值

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

继承自 HTMLElement.onwheel

outerHTML

outerHTML: string

属性值

string

继承自 HTMLElement.outerHTML

outerText

outerText: string

属性值

string

继承自 HTMLElement.outerText

ownerDocument

ownerDocument: Document

属性值

Document

继承自 HTMLElement.ownerDocument

parentElement

返回父元素。

parentElement: null | HTMLElement

属性值

null | HTMLElement

继承自 HTMLElement.parentElement

parentNode

返回父级。

parentNode: null | ParentNode

属性值

null | ParentNode

继承自 HTMLElement.parentNode

part

part: DOMTokenList

属性值

DOMTokenList

继承自 HTMLElement.part

prefix

返回命名空间前缀。

prefix: null | string

属性值

null | string

继承自 HTMLElement.prefix

previousElementSibling

返回前一个是元素的同级,否则返回 null。

previousElementSibling: null | Element

属性值

null | Element

继承自 HTMLElement.previousElementSibling

previousSibling

返回上一个同级。

previousSibling: null | ChildNode

属性值

null | ChildNode

继承自 HTMLElement.previousSibling

PROCESSING_INSTRUCTION_NODE

节点是 ProcessingInstruction 节点。

PROCESSING_INSTRUCTION_NODE: number

属性值

number

继承自 HTMLElement.PROCESSING_INSTRUCTION_NODE 的

role

role: null | string

属性值

null | string

继承自 HTMLElement.role

scrollHeight

scrollHeight: number

属性值

number

继承自 HTMLElement.scrollHeight

scrollLeft

scrollLeft: number

属性值

number

继承自 HTMLElement.scrollLeft

scrollTop

scrollTop: number

属性值

number

继承自 HTMLElement.scrollTop

scrollWidth

scrollWidth: number

属性值

number

继承自 HTMLElement.scrollWidth

shadowRoot

返回元素的阴影根(如果有)以及阴影根的模式为“open”,否则返回 null。

shadowRoot: null | ShadowRoot

属性值

null | ShadowRoot

继承自 HTMLElement.shadowRoot

slot

返回元素的槽内容属性的值。 可以设置为更改它。

slot: string

属性值

string

继承自 HTMLElement.slot

spellcheck

spellcheck: boolean

属性值

boolean

继承自 HTMLElement.spellcheck

style

style: CSSStyleDeclaration

属性值

CSSStyleDeclaration

继承自 HTMLElement.style

tabIndex

tabIndex: number

属性值

number

继承自 HTMLElement.tabIndex

tagName

返回 HTML 大写的限定名称。

tagName: string

属性值

string

继承自 HTMLElement.tagName

textContent

textContent: null | string

属性值

null | string

继承自 HTMLElement.textContent

TEXT_NODE

节点是文本节点。

TEXT_NODE: number

属性值

number

继承自 HTMLElement.TEXT_NODE 的

title

title: string

属性值

string

继承自 HTMLElement.title

translate

translate: boolean

属性值

boolean

继承自 HTMLElement.translate

方法详细信息

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

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

参数

type

K

listener

(this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any

options

boolean | AddEventListenerOptions

getSVGDocument()

function getSVGDocument(): null | Document

返回

null | Document

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: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, boolean | EventListenerOptions)

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

参数

type

K

listener

(this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any

options

boolean | EventListenerOptions

继承的方法详细信息

after((string | Node)[])

在节点之后插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

function after(nodes: (string | Node)[])

参数

nodes

(string | Node)[]

继承自 HTMLElement.after

animate(null | Keyframe[] | PropertyIndexedKeyframes, number | KeyframeAnimationOptions)

function animate(keyframes: null | Keyframe[] | PropertyIndexedKeyframes, options?: number | KeyframeAnimationOptions): Animation

参数

keyframes

null | Keyframe[] | PropertyIndexedKeyframes

options

number | KeyframeAnimationOptions

返回

Animation

继承自 HTMLElement.animate

append((string | Node)[])

在节点的最后一个子级之后插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

function append(nodes: (string | Node)[])

参数

nodes

(string | Node)[]

继承自 HTMLElement.append

appendChild<T>(T)

function appendChild<T>(node: T): T

参数

node

T

返回

T

继承自 HTMLElement.appendChild

attachInternals()

function attachInternals(): ElementInternals

返回

ElementInternals

继承自 HTMLElement.attachInternals

attachShadow(ShadowRootInit)

为元素创建阴影根并返回它。

function attachShadow(init: ShadowRootInit): ShadowRoot

参数

init

ShadowRootInit

返回

ShadowRoot

继承自 HTMLElement.attachShadow

before((string | Node)[])

在节点之前插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

function before(nodes: (string | Node)[])

参数

nodes

(string | Node)[]

继承自 HTMLElement.before

blur()

function blur()

继承自 HTMLElement.blur

click()

function click()

继承自 HTMLElement.click

cloneNode(boolean)

返回节点的副本。 如果深度为 true,则副本还包括节点的后代。

function cloneNode(deep?: boolean): Node

参数

deep

boolean

返回

Node

继承自 HTMLElement.cloneNode

closest<E>(string)

function closest<E>(selectors: string): null | E

参数

selectors

string

返回

null | E

继承自 HTMLElement.closest

closest<K>(K)

返回与选择器匹配的第一个(从元素开始)非独占上级,否则返回 null。

function closest<K>(selector: K): null | HTMLElementTagNameMap[K]

参数

selector

K

返回

null | HTMLElementTagNameMap[K]

继承自 HTMLElement.closest

closest<K>(K)

function closest<K>(selector: K): null | SVGElementTagNameMap[K]

参数

selector

K

返回

null | SVGElementTagNameMap[K]

继承自 HTMLElement.closest

compareDocumentPosition(Node)

返回一个位掩码,指示相对于节点的其他位置。

function compareDocumentPosition(other: Node): number

参数

other

Node

返回

number

继承自 HTMLElement.compareDocumentPosition

contains(null | Node)

如果另一个是节点的非独占后代,则返回 true;否则返回 false。

function contains(other: null | Node): boolean

参数

other

null | Node

返回

boolean

继承自 HTMLElement.contains

dispatchEvent(Event)

如果事件的可取消属性值为 false 或其 preventDefault() 方法未调用,则调度合成事件事件的目标并返回 true;否则返回 false。

function dispatchEvent(event: Event): boolean

参数

event

Event

返回

boolean

继承自 HTMLElement.dispatchEvent

focus(FocusOptions)

function focus(options?: FocusOptions)

参数

options

FocusOptions

继承自 HTMLElement.focus

getAnimations(GetAnimationsOptions)

function getAnimations(options?: GetAnimationsOptions): Animation[]

参数

options

GetAnimationsOptions

返回

Animation[]

继承自 HTMLElement.getAnimations

getAttribute(string)

返回元素的第一个属性,其限定名称为 qualifiedName,如果没有此类属性,则返回 null。

function getAttribute(qualifiedName: string): null | string

参数

qualifiedName

string

返回

null | string

继承自 HTMLElement.getAttribute

getAttributeNames()

返回所有元素属性的限定名称。 可以包含重复项。

function getAttributeNames(): string[]

返回

string[]

继承自 HTMLElement.getAttributeNames

getAttributeNode(string)

function getAttributeNode(qualifiedName: string): null | Attr

参数

qualifiedName

string

返回

null | Attr

继承自 HTMLElement.getAttributeNode

getAttributeNodeNS(null | string, string)

function getAttributeNodeNS(namespace: null | string, localName: string): null | Attr

参数

namespace

null | string

localName

string

返回

null | Attr

继承自 HTMLElement.getAttributeNodeNS

getAttributeNS(null | string, string)

返回命名空间为命名空间且本地名称为 localName 的元素属性,如果没有此类属性,则返回 null。

function getAttributeNS(namespace: null | string, localName: string): null | string

参数

namespace

null | string

localName

string

返回

null | string

继承自 HTMLElement.getAttributeNS

getBoundingClientRect()

function getBoundingClientRect(): DOMRect

返回

DOMRect

继承自 HTMLElement.getBoundingClientRect

getClientRects()

function getClientRects(): DOMRectList

返回

DOMRectList

继承自 HTMLElement.getClientRects

getElementsByClassName(string)

返回调用方法的对象(文档或元素)中具有 classNames 提供的所有类的元素的 HTMLCollection。 classNames 参数被解释为以空格分隔的类列表。

function getElementsByClassName(classNames: string): HTMLCollectionOf<Element>

参数

classNames

string

返回

HTMLCollectionOf<Element>

继承自 HTMLElement.getElementsByClassName

getElementsByTagName(string)

function getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>

参数

qualifiedName

string

返回

HTMLCollectionOf<Element>

继承自 HTMLElement.getElementsByTagName

getElementsByTagName<K>(K)

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>

参数

qualifiedName

K

返回

HTMLCollectionOf<HTMLElementTagNameMap[K]>

继承自 HTMLElement.getElementsByTagName

getElementsByTagName<K>(K)

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>

参数

qualifiedName

K

返回

HTMLCollectionOf<SVGElementTagNameMap[K]>

继承自 HTMLElement.getElementsByTagName

getElementsByTagNameNS("http://www.w3.org/1999/xhtml", string)

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>

参数

namespaceURI

"http://www.w3.org/1999/xhtml"

localName

string

返回

HTMLCollectionOf<HTMLElement>

继承自 HTMLElement.getElementsByTagNameNS

getElementsByTagNameNS("http://www.w3.org/2000/svg", string)

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>

参数

namespaceURI

"http://www.w3.org/2000/svg"

localName

string

返回

HTMLCollectionOf<SVGElement>

继承自 HTMLElement.getElementsByTagNameNS

getElementsByTagNameNS(null | string, string)

function getElementsByTagNameNS(namespace: null | string, localName: string): HTMLCollectionOf<Element>

参数

namespace

null | string

localName

string

返回

HTMLCollectionOf<Element>

继承自 HTMLElement.getElementsByTagNameNS

getRootNode(GetRootNodeOptions)

返回节点的根。

function getRootNode(options?: GetRootNodeOptions): Node

参数

options

GetRootNodeOptions

返回

Node

继承自 HTMLElement.getRootNode

hasAttribute(string)

如果元素具有其限定名称为 qualifiedName 的属性,则返回 true;否则返回 false。

function hasAttribute(qualifiedName: string): boolean

参数

qualifiedName

string

返回

boolean

继承自 HTMLElement.hasAttribute

hasAttributeNS(null | string, string)

如果元素具有命名空间为命名空间且本地名称为 localName 的属性,则返回 true。

function hasAttributeNS(namespace: null | string, localName: string): boolean

参数

namespace

null | string

localName

string

返回

boolean

继承自 HTMLElement.hasAttributeNS

hasAttributes()

如果元素具有属性,则返回 true;否则返回 false。

function hasAttributes(): boolean

返回

boolean

继承自 HTMLElement.hasAttributes

hasChildNodes()

返回节点是否具有子级。

function hasChildNodes(): boolean

返回

boolean

继承自 HTMLElement.hasChildNodes

hasPointerCapture(number)

function hasPointerCapture(pointerId: number): boolean

参数

pointerId

number

返回

boolean

继承自 HTMLElement.hasPointerCapture

insertAdjacentElement(InsertPosition, Element)

function insertAdjacentElement(where: InsertPosition, element: Element): null | Element

参数

where

InsertPosition

element

Element

返回

null | Element

继承自 HTMLElement.insertAdjacentElement

insertAdjacentHTML(InsertPosition, string)

function insertAdjacentHTML(position: InsertPosition, text: string)

参数

position

InsertPosition

text

string

继承自 HTMLElement.insertAdjacentHTML

insertAdjacentText(InsertPosition, string)

function insertAdjacentText(where: InsertPosition, data: string)

参数

where

InsertPosition

data

string

继承自 HTMLElement.insertAdjacentText

insertBefore<T>(T, null | Node)

function insertBefore<T>(node: T, child: null | Node): T

参数

node

T

child

null | Node

返回

T

继承自 HTMLElement.insertBefore

isDefaultNamespace(null | string)

function isDefaultNamespace(namespace: null | string): boolean

参数

namespace

null | string

返回

boolean

继承自 HTMLElement.isDefaultNamespace

isEqualNode(null | Node)

返回节点和其他Node 是否具有相同的属性。

function isEqualNode(otherNode: null | Node): boolean

参数

otherNode

null | Node

返回

boolean

继承自 HTMLElement.isEqualNode

isSameNode(null | Node)

function isSameNode(otherNode: null | Node): boolean

参数

otherNode

null | Node

返回

boolean

继承自 HTMLElement.isSameNode

lookupNamespaceURI(null | string)

function lookupNamespaceURI(prefix: null | string): null | string

参数

prefix

null | string

返回

null | string

继承自 HTMLElement.lookupNamespaceURI

lookupPrefix(null | string)

function lookupPrefix(namespace: null | string): null | string

参数

namespace

null | string

返回

null | string

继承自 HTMLElement.lookupPrefix

matches(string)

如果匹配选择器与元素的根生成元素匹配,则返回 true;否则返回 false。

function matches(selectors: string): boolean

参数

selectors

string

返回

boolean

继承自 HTMLElement.matches

normalize()

删除空的独占文本节点,并将剩余连续独占文本节点的数据串联到其第一个节点中。

function normalize()

继承自 HTMLElement.normalize

prepend((string | Node)[])

在节点的第一个子级之前插入节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

function prepend(nodes: (string | Node)[])

参数

nodes

(string | Node)[]

继承自 HTMLElement.prepend

querySelector<E>(string)

function querySelector<E>(selectors: string): null | E

参数

selectors

string

返回

null | E

继承自 HTMLElement.querySelector

querySelector<K>(K)

返回与选择器匹配的节点后代的第一个元素。

function querySelector<K>(selectors: K): null | HTMLElementTagNameMap[K]

参数

selectors

K

返回

null | HTMLElementTagNameMap[K]

继承自 HTMLElement.querySelector

querySelector<K>(K)

function querySelector<K>(selectors: K): null | SVGElementTagNameMap[K]

参数

selectors

K

返回

null | SVGElementTagNameMap[K]

继承自 HTMLElement.querySelector

querySelectorAll<E>(string)

function querySelectorAll<E>(selectors: string): NodeListOf<E>

参数

selectors

string

返回

NodeListOf<E>

继承自 HTMLElement.querySelectorAll

querySelectorAll<K>(K)

返回与选择器匹配的节点的所有元素后代。

function querySelectorAll<K>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>

参数

selectors

K

返回

NodeListOf<HTMLElementTagNameMap[K]>

继承自 HTMLElement.querySelectorAll

querySelectorAll<K>(K)

function querySelectorAll<K>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>

参数

selectors

K

返回

NodeListOf<SVGElementTagNameMap[K]>

继承自 HTMLElement.querySelectorAll

releasePointerCapture(number)

function releasePointerCapture(pointerId: number)

参数

pointerId

number

继承自 HTMLElement.releasePointerCapture

remove()

删除节点。

function remove()

继承自 HTMLElement.remove

removeAttribute(string)

删除其限定名称为 qualifiedName 的元素的第一个属性。

function removeAttribute(qualifiedName: string)

参数

qualifiedName

string

继承自 HTMLElement.removeAttribute

removeAttributeNode(Attr)

function removeAttributeNode(attr: Attr): Attr

参数

attr

Attr

返回

Attr

继承自 HTMLElement.removeAttributeNode

removeAttributeNS(null | string, string)

删除命名空间为命名空间且本地名称为 localName 的元素属性。

function removeAttributeNS(namespace: null | string, localName: string)

参数

namespace

null | string

localName

string

继承自 HTMLElement.removeAttributeNS

removeChild<T>(T)

function removeChild<T>(child: T): T

参数

child

T

返回

T

继承自 HTMLElement.removeChild

replaceChild<T>(Node, T)

function replaceChild<T>(node: Node, child: T): T

参数

node

Node

child

T

返回

T

继承自 HTMLElement.replaceChild

replaceChildren((string | Node)[])

将节点的所有子级替换为节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

function replaceChildren(nodes: (string | Node)[])

参数

nodes

(string | Node)[]

继承自 HTMLElement.replaceChildren

replaceWith((string | Node)[])

将节点替换为节点,同时将节点中的字符串替换为等效的文本节点。

如果违反节点树的约束,则引发“HierarchyRequestError”DOMException。

function replaceWith(nodes: (string | Node)[])

参数

nodes

(string | Node)[]

继承自 HTMLElement.replaceWith

requestFullscreen(FullscreenOptions)

显示元素全屏,并在完成后解析承诺。

提供时,选项的 navigationUI 成员指示是否在全屏显示导航 UI 是首选的。 如果设置为“show”,则导航简单性优先于屏幕空间,如果设置为“隐藏”,则首选更多屏幕空间。 用户代理始终可以自由地遵循用户对应用程序的偏好。 默认值“auto”表示没有应用程序首选项。

function requestFullscreen(options?: FullscreenOptions): Promise<void>

参数

options

FullscreenOptions

返回

Promise<void>

继承自 HTMLElement.requestFullscreen

requestPointerLock()

function requestPointerLock()

继承自 HTMLElement.requestPointerLock

scroll(number, number)

function scroll(x: number, y: number)

参数

x

number

y

number

继承自 HTMLElement.scroll

scroll(ScrollToOptions)

function scroll(options?: ScrollToOptions)

参数

options

ScrollToOptions

继承自 HTMLElement.scroll

scrollBy(number, number)

function scrollBy(x: number, y: number)

参数

x

number

y

number

继承自 HTMLElement.scrollBy

scrollBy(ScrollToOptions)

function scrollBy(options?: ScrollToOptions)

参数

options

ScrollToOptions

继承自 HTMLElement.scrollBy

scrollIntoView(boolean | ScrollIntoViewOptions)

function scrollIntoView(arg?: boolean | ScrollIntoViewOptions)

参数

arg

boolean | ScrollIntoViewOptions

继承自 HTMLElement.scrollIntoView

scrollTo(number, number)

function scrollTo(x: number, y: number)

参数

x

number

y

number

继承自 HTMLElement.scrollTo

scrollTo(ScrollToOptions)

function scrollTo(options?: ScrollToOptions)

参数

options

ScrollToOptions

继承自 HTMLElement.scrollTo

setAttribute(string, string)

将限定名称为 qualifiedName 的元素的第一个特性的值设置为值。

function setAttribute(qualifiedName: string, value: string)

参数

qualifiedName

string

value

string

继承自 HTMLElement.setAttribute

setAttributeNode(Attr)

function setAttributeNode(attr: Attr): null | Attr

参数

attr

Attr

返回

null | Attr

继承自 HTMLElement.setAttributeNode

setAttributeNodeNS(Attr)

function setAttributeNodeNS(attr: Attr): null | Attr

参数

attr

Attr

返回

null | Attr

继承自 HTMLElement.setAttributeNodeNS

setAttributeNS(null | string, string, string)

将命名空间为命名空间且本地名称为 localName 的元素属性的值设置为值。

function setAttributeNS(namespace: null | string, qualifiedName: string, value: string)

参数

namespace

null | string

qualifiedName

string

value

string

继承自 HTMLElement.setAttributeNS

setPointerCapture(number)

function setPointerCapture(pointerId: number)

参数

pointerId

number

继承自 HTMLElement.setPointerCapture

toggleAttribute(string, boolean)

如果未指定 force,则为“toggles”qualifiedName,如果存在,则将其删除,如果不存在,则将其添加。 如果 force 为 true,则添加 qualifiedName。 如果 force 为 false,则删除 qualifiedName。

如果 qualifiedName 现在存在,则返回 true;否则返回 false。

function toggleAttribute(qualifiedName: string, force?: boolean): boolean

参数

qualifiedName

string

force

boolean

返回

boolean

继承自 HTMLElement.toggleAttribute

webkitMatchesSelector(string)

警告

现已弃用此 API。

This is a legacy alias of matches.

function webkitMatchesSelector(selectors: string): boolean

参数

selectors

string

返回

boolean

继承自 HTMLElement.webkitMatchesSelector