選項
全部
  • 公開
  • 公開/受保護
  • 全部
選單

階層

  • HTMLElement
    • SwiperSlide

索引

屬性

方法

屬性

唯讀 ATTRIBUTE_NODE

ATTRIBUTE_NODE: number

唯讀 CDATA_SECTION_NODE

CDATA_SECTION_NODE: number

節點是 CDATASection 節點。

唯讀 COMMENT_NODE

COMMENT_NODE: number

節點是註解節點。

唯讀 DOCUMENT_FRAGMENT_NODE

DOCUMENT_FRAGMENT_NODE: number

節點是 DocumentFragment 節點。

唯讀 DOCUMENT_NODE

DOCUMENT_NODE: number

節點是一個文件。

唯讀 DOCUMENT_POSITION_CONTAINED_BY

DOCUMENT_POSITION_CONTAINED_BY: number

當其他節點是節點的後代時設定。

唯讀 DOCUMENT_POSITION_CONTAINS

DOCUMENT_POSITION_CONTAINS: number

當其他節點是節點的祖先時設定。

唯讀 DOCUMENT_POSITION_DISCONNECTED

DOCUMENT_POSITION_DISCONNECTED: number

當節點和其他節點不在同一棵樹中時設定。

唯讀 DOCUMENT_POSITION_FOLLOWING

DOCUMENT_POSITION_FOLLOWING: number

當其他節點在節點之後時設定。

唯讀 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number

唯讀 DOCUMENT_POSITION_PRECEDING

DOCUMENT_POSITION_PRECEDING: number

當其他節點在節點之前時設定。

唯讀 DOCUMENT_TYPE_NODE

DOCUMENT_TYPE_NODE: number

節點是一個 doctype。

唯讀 ELEMENT_NODE

ELEMENT_NODE: number

節點是一個元素。

唯讀 ENTITY_NODE

ENTITY_NODE: number

唯讀 ENTITY_REFERENCE_NODE

ENTITY_REFERENCE_NODE: number

唯讀 NOTATION_NODE

NOTATION_NODE: number

唯讀 PROCESSING_INSTRUCTION_NODE

PROCESSING_INSTRUCTION_NODE: number

節點是一個 ProcessingInstruction 節點。

唯讀 TEXT_NODE

TEXT_NODE: number

節點是一個文字節點。

accessKey

accessKey: string

唯讀 accessKeyLabel

accessKeyLabel: string

唯讀 assignedSlot

assignedSlot: null | HTMLSlotElement

唯讀 attributes

attributes: NamedNodeMap

autocapitalize

autocapitalize: string

autofocus

autofocus: boolean

唯讀 baseURI

baseURI: string

回傳節點的節點文件之文件基礎 URL。

唯讀 childElementCount

childElementCount: number

唯讀 childNodes

childNodes: NodeListOf<ChildNode>

回傳子節點。

唯讀 children

children: HTMLCollection

回傳子元素。

唯讀 classList

classList: DOMTokenList

允許透過 DOMTokenList 物件,將元素的 class 內容屬性作為一組以空白分隔的 token 進行操作。

className

className: string

回傳元素 class 內容屬性的值。可以設定來變更它。

唯讀 clientHeight

clientHeight: number

唯讀 clientLeft

clientLeft: number

唯讀 clientTop

clientTop: number

唯讀 clientWidth

clientWidth: number

contentEditable

contentEditable: string

唯讀 dataset

dataset: DOMStringMap

dir

dir: string

draggable

draggable: boolean

enterKeyHint

enterKeyHint: string

唯讀 firstChild

firstChild: null | ChildNode

回傳第一個子節點。

唯讀 firstElementChild

firstElementChild: null | Element

回傳第一個為元素的子節點,否則回傳 null。

hidden

hidden: boolean

id

id: string

回傳元素 id 內容屬性的值。可以設定來變更它。

innerHTML

innerHTML: string

innerText

innerText: string

inputMode

inputMode: string

唯讀 isConnected

isConnected: boolean

如果節點已連接,則回傳 true,否則回傳 false。

唯讀 isContentEditable

isContentEditable: boolean

lang

lang: string

唯讀 lastChild

lastChild: null | ChildNode

回傳最後一個子節點。

唯讀 lastElementChild

lastElementChild: null | Element

回傳最後一個為元素的子節點,否則回傳 null。

lazy

lazy: string | boolean

唯讀 localName

localName: string

回傳本地名稱。

唯讀 namespaceURI

namespaceURI: null | string

回傳命名空間。

唯讀 nextElementSibling

nextElementSibling: null | Element

回傳第一個為元素的下一個兄弟節點,否則回傳 null。

唯讀 nextSibling

nextSibling: null | ChildNode

回傳下一個兄弟節點。

唯讀 nodeName

nodeName: string

回傳適合節點類型的字串。

唯讀 nodeType

nodeType: number

回傳節點的類型。

nodeValue

nodeValue: null | string

可選 nonce

nonce: string

唯讀 offsetHeight

offsetHeight: number

唯讀 offsetLeft

offsetLeft: number

唯讀 offsetParent

offsetParent: null | Element

唯讀 offsetTop

offsetTop: number

唯讀 offsetWidth

offsetWidth: number

onabort

onabort: null | ((ev: UIEvent) => any)

當使用者中止下載時觸發。

參數

事件。

onanimationcancel

onanimationcancel: null | ((ev: AnimationEvent) => any)

onanimationend

onanimationend: null | ((ev: AnimationEvent) => any)

onanimationiteration

onanimationiteration: null | ((ev: AnimationEvent) => any)

onanimationstart

onanimationstart: null | ((ev: AnimationEvent) => any)

onauxclick

onauxclick: null | ((ev: MouseEvent) => any)

onblur

onblur: null | ((ev: FocusEvent) => any)

當物件失去輸入焦點時觸發。

參數

焦點事件。

oncancel

oncancel: null | ((ev: Event) => any)

oncanplay

oncanplay: null | ((ev: Event) => any)

當可以播放但需要進一步緩衝時觸發。

參數

事件。

oncanplaythrough

oncanplaythrough: null | ((ev: Event) => any)

onchange

onchange: null | ((ev: Event) => any)

當物件的內容或選取範圍發生變更時觸發。

參數

事件。

onclick

onclick: null | ((ev: MouseEvent) => any)

當使用者在物件上點擊滑鼠左鍵時觸發

參數

滑鼠事件。

onclose

onclose: null | ((ev: Event) => any)

oncontextmenu

oncontextmenu: null | ((ev: MouseEvent) => any)

當使用者在客戶端區域點擊滑鼠右鍵,開啟內容選單時觸發。

參數

滑鼠事件。

oncopy

oncopy: null | ((ev: ClipboardEvent) => any)

oncuechange

oncuechange: null | ((ev: Event) => any)

oncut

oncut: null | ((ev: ClipboardEvent) => any)

ondblclick

ondblclick: null | ((ev: MouseEvent) => any)

當使用者在物件上按兩下滑鼠時觸發。

參數

滑鼠事件。

ondrag

ondrag: null | ((ev: DragEvent) => any)

在拖曳操作期間,於來源物件上持續觸發。

參數

事件。

ondragend

ondragend: null | ((ev: DragEvent) => any)

當使用者在拖曳操作結束時放開滑鼠時,於來源物件上觸發。

參數

事件。

ondragenter

ondragenter: null | ((ev: DragEvent) => any)

當使用者將物件拖曳至有效的置放目標時,於目標元素上觸發。

參數

拖曳事件。

ondragexit

ondragexit: null | ((ev: Event) => any)

ondragleave

ondragleave: null | ((ev: DragEvent) => any)

當使用者在拖曳操作期間將滑鼠移出有效的置放目標時,於目標物件上觸發。

參數

拖曳事件。

ondragover

ondragover: null | ((ev: DragEvent) => any)

當使用者將物件拖曳至有效的置放目標上方時,於目標元素上持續觸發。

參數

事件。

ondragstart

ondragstart: null | ((ev: DragEvent) => any)

當使用者開始拖曳文字選取範圍或選取的物件時,於來源物件上觸發。

參數

事件。

ondrop

ondrop: null | ((ev: DragEvent) => any)

ondurationchange

ondurationchange: null | ((ev: Event) => any)

當 duration 屬性更新時觸發。

參數

事件。

onemptied

onemptied: null | ((ev: Event) => any)

當媒體元素重置為其初始狀態時觸發。

參數

事件。

onended

onended: null | ((ev: Event) => any)

當播放到達結尾時觸發。

參數

此事件

onerror

onerror: OnErrorEventHandler

當物件載入時發生錯誤時觸發。

參數

事件。

onfocus

onfocus: null | ((ev: FocusEvent) => any)

當物件獲得焦點時觸發。

參數

事件。

onfullscreenchange

onfullscreenchange: null | ((ev: Event) => any)

onfullscreenerror

onfullscreenerror: null | ((ev: Event) => any)

ongotpointercapture

ongotpointercapture: null | ((ev: PointerEvent) => any)

oninput

oninput: null | ((ev: Event) => any)

oninvalid

oninvalid: null | ((ev: Event) => any)

onkeydown

onkeydown: null | ((ev: KeyboardEvent) => any)

當使用者按下按鍵時觸發。

參數

鍵盤事件

onkeypress

onkeypress: null | ((ev: KeyboardEvent) => any)

當使用者按下字母數字鍵時觸發。

參數

事件。

onkeyup

onkeyup: null | ((ev: KeyboardEvent) => any)

當使用者放開按鍵時觸發。

參數

鍵盤事件

onload

onload: null | ((ev: Event) => any)

當瀏覽器載入物件後立即觸發。

參數

事件。

onloadeddata

onloadeddata: null | ((ev: Event) => any)

當媒體資料在目前播放位置載入時觸發。

參數

事件。

onloadedmetadata

onloadedmetadata: null | ((ev: Event) => any)

當媒體的持續時間和尺寸已確定時觸發。

參數

事件。

onloadstart

onloadstart: null | ((ev: Event) => any)

當 Internet Explorer 開始尋找媒體資料時觸發。

參數

事件。

onlostpointercapture

onlostpointercapture: null | ((ev: PointerEvent) => any)

onmousedown

onmousedown: null | ((ev: MouseEvent) => any)

當使用者使用任一滑鼠按鈕點擊物件時觸發。

參數

滑鼠事件。

onmouseenter

onmouseenter: null | ((ev: MouseEvent) => any)

onmouseleave

onmouseleave: null | ((ev: MouseEvent) => any)

onmousemove

onmousemove: null | ((ev: MouseEvent) => any)

當使用者將滑鼠移至物件上方時觸發。

參數

滑鼠事件。

onmouseout

onmouseout: null | ((ev: MouseEvent) => any)

當使用者將滑鼠指標移出物件邊界外時觸發。

參數

滑鼠事件。

onmouseover

onmouseover: null | ((ev: MouseEvent) => any)

當使用者將滑鼠指標移入物件時觸發。

參數

滑鼠事件。

onmouseup

onmouseup: null | ((ev: MouseEvent) => any)

當使用者將滑鼠停留在物件上方並放開滑鼠按鈕時觸發。

參數

滑鼠事件。

onpaste

onpaste: null | ((ev: ClipboardEvent) => any)

onpause

onpause: null | ((ev: Event) => any)

當播放暫停時發生。

參數

事件。

onplay

onplay: null | ((ev: Event) => any)

當請求播放方法時發生。

參數

事件。

onplaying

onplaying: null | ((ev: Event) => any)

當音訊或視訊開始播放時發生。

參數

事件。

onpointercancel

onpointercancel: null | ((ev: PointerEvent) => any)

onpointerdown

onpointerdown: null | ((ev: PointerEvent) => any)

onpointerenter

onpointerenter: null | ((ev: PointerEvent) => any)

onpointerleave

onpointerleave: null | ((ev: PointerEvent) => any)

onpointermove

onpointermove: null | ((ev: PointerEvent) => any)

onpointerout

onpointerout: null | ((ev: PointerEvent) => any)

onpointerover

onpointerover: null | ((ev: PointerEvent) => any)

onpointerup

onpointerup: null | ((ev: PointerEvent) => any)

onprogress

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

當下載媒體資料時,表示進度時發生。

參數

事件。

onratechange

onratechange: null | ((ev: Event) => any)

當播放速率增加或減少時發生。

參數

事件。

onreset

onreset: null | ((ev: Event) => any)

當使用者重設表單時觸發。

參數

事件。

onresize

onresize: null | ((ev: UIEvent) => any)

onscroll

onscroll: null | ((ev: Event) => any)

當使用者在物件的捲軸上重新定位捲動框時觸發。

參數

事件。

onsecuritypolicyviolation

onsecuritypolicyviolation: null | ((ev: SecurityPolicyViolationEvent) => any)

onseeked

onseeked: null | ((ev: Event) => any)

當搜尋操作結束時發生。

參數

事件。

onseeking

onseeking: null | ((ev: Event) => any)

當目前的播放位置被移動時發生。

參數

事件。

onselect

onselect: null | ((ev: Event) => any)

當目前的選取範圍變更時觸發。

參數

事件。

onselectionchange

onselectionchange: null | ((ev: Event) => any)

onselectstart

onselectstart: null | ((ev: Event) => any)

onstalled

onstalled: null | ((ev: Event) => any)

當下載停止時發生。

參數

事件。

onsubmit

onsubmit: null | ((ev: Event) => any)

onsuspend

onsuspend: null | ((ev: Event) => any)

如果載入操作被故意停止時發生。

參數

事件。

ontimeupdate

ontimeupdate: null | ((ev: Event) => any)

當表示目前的播放位置時發生。

參數

事件。

ontoggle

ontoggle: null | ((ev: Event) => any)

可選的 ontouchcancel

ontouchcancel: null | ((ev: TouchEvent) => any)

可選 ontouchend

ontouchend: null | ((ev: TouchEvent) => any)

可選 ontouchmove

ontouchmove: null | ((ev: TouchEvent) => any)

可選 ontouchstart

ontouchstart: null | ((ev: TouchEvent) => any)

ontransitioncancel

ontransitioncancel: null | ((ev: TransitionEvent) => any)

ontransitionend

ontransitionend: null | ((ev: TransitionEvent) => any)

ontransitionrun

ontransitionrun: null | ((ev: TransitionEvent) => any)

ontransitionstart

ontransitionstart: null | ((ev: TransitionEvent) => any)

onvolumechange

onvolumechange: null | ((ev: Event) => any)

當音量變更,或播放靜音或取消靜音時發生。

參數

事件。

onwaiting

onwaiting: null | ((ev: Event) => any)

當播放停止,因為影片資源的下一個影格不可用時發生。

參數

事件。

onwheel

onwheel: null | ((ev: WheelEvent) => any)

outerHTML

outerHTML: string

唯讀 ownerDocument

ownerDocument: Document

唯讀 parentElement

parentElement: null | HTMLElement

傳回父元素。

唯讀 parentNode

parentNode: null | (Node & ParentNode)

傳回父節點。

唯讀 prefix

prefix: null | string

傳回命名空間前綴。

唯讀 previousElementSibling

previousElementSibling: null | Element

傳回前一個為元素的同層級元素,否則傳回 null。

唯讀 previousSibling

previousSibling: null | ChildNode

傳回前一個同層級節點。

唯讀 scrollHeight

scrollHeight: number

scrollLeft

scrollLeft: number

scrollTop

scrollTop: number

唯讀 scrollWidth

scrollWidth: number

唯讀 shadowRoot

shadowRoot: null | ShadowRoot

傳回元素的陰影根,如果有的話,並且陰影根的模式為 "open",否則傳回 null。

slot

slot: string

傳回元素 slot 內容屬性的值。可以設定以變更它。

spellcheck

spellcheck: boolean

唯讀 style

style: CSSStyleDeclaration

tabIndex

tabIndex: number

唯讀 tagName

tagName: string

傳回 HTML 大寫的限定名稱。

textContent

textContent: null | string

title

title: string

translate

translate: boolean

方法

addEventListener

  • addEventListener<K>(type: K, listener: (ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void
  • addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void
  • 型別參數

    • K: keyof HTMLElementEventMap

    參數

    • type: K
    • listener: (ev: HTMLElementEventMap[K]) => any
        • (ev: HTMLElementEventMap[K]): any
        • 參數

          • ev: HTMLElementEventMap[K]

          傳回 any

    • 可選 options: boolean | AddEventListenerOptions

    傳回 void

  • 參數

    • type: string
    • listener: EventListenerOrEventListenerObject
    • 可選 options: boolean | AddEventListenerOptions

    傳回 void

after

  • after(...nodes: (string | Node)[]): void
  • 在節點之後插入節點,同時將節點中的字串替換為等效的 Text 節點。

    如果違反節點樹的約束,則拋出 "HierarchyRequestError" DOMException 錯誤。

    參數

    • 剩餘參數 ...nodes: (string | Node)[]

    傳回 void

animate

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

    • keyframes: null | Keyframe[] | PropertyIndexedKeyframes
    • 可選 options: number | KeyframeAnimationOptions

    回傳 Animation

append

  • append(...nodes: (string | Node)[]): void
  • 在節點的最後一個子節點之後插入節點,同時將節點中的字串替換為等效的 Text 節點。

    如果違反節點樹的約束,則拋出 "HierarchyRequestError" DOMException 錯誤。

    參數

    • 剩餘參數 ...nodes: (string | Node)[]

    傳回 void

appendChild

  • appendChild<T>(newChild: T): T
  • 型別參數

    • T: Node

    參數

    • newChild: T

    回傳 T

attachShadow

  • attachShadow(init: ShadowRootInit): ShadowRoot
  • 為元素建立陰影根並返回它。

    參數

    • init: ShadowRootInit

    回傳 ShadowRoot

before

  • before(...nodes: (string | Node)[]): void
  • 在節點之前插入節點,同時將節點中的字串替換為等效的 Text 節點。

    如果違反節點樹的約束,則拋出 "HierarchyRequestError" DOMException 錯誤。

    參數

    • 剩餘參數 ...nodes: (string | Node)[]

    傳回 void

blur

  • blur(): void
  • 傳回 void

click

  • click(): void
  • 傳回 void

cloneNode

  • cloneNode(deep?: boolean): Node
  • 返回節點的副本。如果 deep 為 true,則副本還包括節點的後代。

    參數

    • 可選 deep: boolean

    回傳 Node

closest

  • closest<K>(selector: K): null | HTMLElementTagNameMap[K]
  • closest<K>(selector: K): null | SVGElementTagNameMap[K]
  • closest<E>(selector: string): null | E
  • 返回第一個(從元素開始)包含的符合選擇器的祖先,否則返回 null。

    型別參數

    • K: keyof HTMLElementTagNameMap

    參數

    • selector: K

    回傳 null | HTMLElementTagNameMap[K]

  • 型別參數

    • K: keyof SVGElementTagNameMap

    參數

    • selector: K

    回傳 null | SVGElementTagNameMap[K]

  • 型別參數

    • E: Element = Element

    參數

    • selector: string

    回傳 null | E

compareDocumentPosition

  • compareDocumentPosition(other: Node): number
  • 返回一個位元遮罩,指示其他節點相對於此節點的位置。

    參數

    • other: Node

    回傳 number

contains

  • contains(other: null | Node): boolean
  • 如果其他節點是此節點的包含後代,則返回 true,否則返回 false。

    參數

    • other: null | Node

    回傳 boolean

dispatchEvent

  • dispatchEvent(event: Event): boolean
  • 將合成事件 event 分派到 target,如果事件的 cancelable 屬性值為 false 或其 preventDefault() 方法未被調用,則返回 true,否則返回 false。

    參數

    • event: Event

    回傳 boolean

focus

  • focus(options?: FocusOptions): void
  • 參數

    • 可選 options: FocusOptions

    傳回 void

getAnimations

  • getAnimations(): Animation[]
  • 回傳 Animation[]

getAttribute

  • getAttribute(qualifiedName: string): null | string
  • 返回元素第一個符合 qualifiedName 限定名稱的屬性,如果沒有這樣的屬性,則返回 null。

    參數

    • qualifiedName: string

    回傳 null | string

getAttributeNS

  • getAttributeNS(namespace: null | string, localName: string): null | string
  • 返回元素名稱空間為 namespace 且本地名稱為 localName 的屬性,如果沒有這樣的屬性,則返回 null。

    參數

    • namespace: null | string
    • localName: string

    回傳 null | string

getAttributeNames

  • getAttributeNames(): string[]
  • 返回元素所有屬性的限定名稱。可以包含重複項。

    回傳 string[]

getAttributeNode

  • getAttributeNode(qualifiedName: string): null | Attr
  • 參數

    • qualifiedName: string

    回傳 null | Attr

getAttributeNodeNS

  • getAttributeNodeNS(namespace: null | string, localName: string): null | Attr
  • 參數

    • namespace: null | string
    • localName: string

    回傳 null | Attr

getBoundingClientRect

  • getBoundingClientRect(): DOMRect
  • 回傳 DOMRect

getClientRects

  • getClientRects(): DOMRectList
  • 回傳 DOMRectList

getElementsByClassName

  • getElementsByClassName(classNames: string): HTMLCollectionOf<Element>
  • 返回一個 HTMLCollection,其中包含呼叫此方法的物件(文件或元素)中,所有具有 classNames 指定之所有類別的元素。classNames 參數被解讀為以空格分隔的類別列表。

    參數

    • classNames: string

    返回 HTMLCollectionOf<Element>

getElementsByTagName

  • getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>
  • getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>
  • getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>
  • 型別參數

    • K: keyof HTMLElementTagNameMap

    參數

    • qualifiedName: K

    返回 HTMLCollectionOf<HTMLElementTagNameMap[K]>

  • 型別參數

    • K: keyof SVGElementTagNameMap

    參數

    • qualifiedName: K

    返回 HTMLCollectionOf<SVGElementTagNameMap[K]>

  • 參數

    • qualifiedName: string

    返回 HTMLCollectionOf<Element>

getElementsByTagNameNS

  • getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>
  • getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>
  • getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>
  • 參數

    • namespaceURI: "http://www.w3.org/1999/xhtml"
    • localName: string

    返回 HTMLCollectionOf<HTMLElement>

  • 參數

    • namespaceURI: "http://www.w3.org/2000/svg"
    • localName: string

    返回 HTMLCollectionOf<SVGElement>

  • 參數

    • namespaceURI: string
    • localName: string

    返回 HTMLCollectionOf<Element>

getRootNode

  • getRootNode(options?: GetRootNodeOptions): Node
  • 返回節點的根。

    參數

    • 可選 options: GetRootNodeOptions

    回傳 Node

hasAttribute

  • hasAttribute(qualifiedName: string): boolean
  • 如果元素具有合格名稱為 qualifiedName 的屬性,則返回 true,否則返回 false。

    參數

    • qualifiedName: string

    回傳 boolean

hasAttributeNS

  • hasAttributeNS(namespace: null | string, localName: string): boolean
  • 如果元素具有命名空間為 namespace 且本地名稱為 localName 的屬性,則返回 true。

    參數

    • namespace: null | string
    • localName: string

    回傳 boolean

hasAttributes

  • hasAttributes(): boolean
  • 如果元素具有屬性,則返回 true,否則返回 false。

    回傳 boolean

hasChildNodes

  • hasChildNodes(): boolean
  • 返回節點是否具有子節點。

    回傳 boolean

hasPointerCapture

  • hasPointerCapture(pointerId: number): boolean
  • 參數

    • pointerId: number

    回傳 boolean

insertAdjacentElement

  • insertAdjacentElement(position: InsertPosition, insertedElement: Element): null | Element
  • 參數

    • position: InsertPosition
    • insertedElement: Element

    返回 null | Element

insertAdjacentHTML

  • insertAdjacentHTML(where: InsertPosition, html: string): void
  • 參數

    • where: InsertPosition
    • html: string

    傳回 void

insertAdjacentText

  • insertAdjacentText(where: InsertPosition, text: string): void
  • 參數

    • where: InsertPosition
    • text: string

    傳回 void

insertBefore

  • insertBefore<T>(newChild: T, refChild: null | Node): T
  • 型別參數

    • T: Node

    參數

    • newChild: T
    • refChild: null | Node

    回傳 T

isDefaultNamespace

  • isDefaultNamespace(namespace: null | string): boolean
  • 參數

    • namespace: null | string

    回傳 boolean

isEqualNode

  • isEqualNode(otherNode: null | Node): boolean
  • 返回節點和 otherNode 是否具有相同的屬性。

    參數

    • otherNode: null | Node

    回傳 boolean

isSameNode

  • isSameNode(otherNode: null | Node): boolean
  • 參數

    • otherNode: null | Node

    回傳 boolean

lookupNamespaceURI

  • lookupNamespaceURI(prefix: null | string): null | string
  • 參數

    • prefix: null | string

    回傳 null | string

lookupPrefix

  • lookupPrefix(namespace: null | string): null | string
  • 參數

    • namespace: null | string

    回傳 null | string

matches

  • matches(selectors: string): boolean
  • 如果比對元素的根節點與指定的選擇器相符,則傳回 true,否則傳回 false。

    參數

    • selectors: string

    回傳 boolean

msGetRegionContent

  • msGetRegionContent(): any
  • 傳回 any

normalize

  • normalize(): void
  • 移除空的獨佔 Text 節點,並將剩餘連續的獨佔 Text 節點的資料串連到第一個節點中。

    傳回 void

prepend

  • prepend(...nodes: (string | Node)[]): void
  • 將節點插入到節點的第一個子節點之前,同時將節點中的字串替換為等效的 Text 節點。

    如果違反節點樹的約束,則拋出 "HierarchyRequestError" DOMException 錯誤。

    參數

    • 剩餘參數 ...nodes: (string | Node)[]

    傳回 void

querySelector

  • querySelector<K>(selectors: K): null | HTMLElementTagNameMap[K]
  • querySelector<K>(selectors: K): null | SVGElementTagNameMap[K]
  • querySelector<E>(selectors: string): null | E
  • 傳回符合選擇器的節點的第一個子元素。

    型別參數

    • K: keyof HTMLElementTagNameMap

    參數

    • selectors: K

    回傳 null | HTMLElementTagNameMap[K]

  • 型別參數

    • K: keyof SVGElementTagNameMap

    參數

    • selectors: K

    回傳 null | SVGElementTagNameMap[K]

  • 型別參數

    • E: Element = Element

    參數

    • selectors: string

    回傳 null | E

querySelectorAll

  • querySelectorAll<K>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>
  • querySelectorAll<K>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>
  • querySelectorAll<E>(selectors: string): NodeListOf<E>
  • 傳回所有符合選擇器的節點子元素。

    型別參數

    • K: keyof HTMLElementTagNameMap

    參數

    • selectors: K

    傳回 NodeListOf<HTMLElementTagNameMap[K]>

  • 型別參數

    • K: keyof SVGElementTagNameMap

    參數

    • selectors: K

    傳回 NodeListOf<SVGElementTagNameMap[K]>

  • 型別參數

    • E: Element = Element

    參數

    • selectors: string

    傳回 NodeListOf<E>

releasePointerCapture

  • releasePointerCapture(pointerId: number): void
  • 參數

    • pointerId: number

    傳回 void

remove

  • remove(): void
  • 移除節點。

    傳回 void

removeAttribute

  • removeAttribute(qualifiedName: string): void
  • 移除元素第一個符合 qualifiedName 的屬性。

    參數

    • qualifiedName: string

    傳回 void

removeAttributeNS

  • removeAttributeNS(namespace: null | string, localName: string): void
  • 移除元素命名空間為 namespace,本地名稱為 localName 的屬性。

    參數

    • namespace: null | string
    • localName: string

    傳回 void

removeAttributeNode

  • removeAttributeNode(attr: Attr): Attr
  • 參數

    • attr: Attr

    傳回 Attr

removeChild

  • removeChild<T>(oldChild: T): T
  • 型別參數

    • T: Node

    參數

    • oldChild: T

    回傳 T

removeEventListener

  • removeEventListener<K>(type: K, listener: (ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void
  • removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void
  • 型別參數

    • K: keyof HTMLElementEventMap

    參數

    • type: K
    • listener: (ev: HTMLElementEventMap[K]) => any
        • (ev: HTMLElementEventMap[K]): any
        • 參數

          • ev: HTMLElementEventMap[K]

          傳回 any

    • 選填 options: boolean | EventListenerOptions

    傳回 void

  • 參數

    • type: string
    • listener: EventListenerOrEventListenerObject
    • 選填 options: boolean | EventListenerOptions

    傳回 void

replaceChild

  • replaceChild<T>(newChild: Node, oldChild: T): T
  • 型別參數

    • T: Node

    參數

    • newChild: Node
    • oldChild: T

    回傳 T

replaceWith

  • replaceWith(...nodes: (string | Node)[]): void
  • 將節點替換為 nodes,同時將 nodes 中的字串替換為等效的 Text 節點。

    如果違反節點樹的約束,則拋出 "HierarchyRequestError" DOMException 錯誤。

    參數

    • 剩餘參數 ...nodes: (string | Node)[]

    傳回 void

requestFullscreen

  • requestFullscreen(options?: FullscreenOptions): Promise<void>
  • 以全螢幕顯示元素,並在完成時解析 promise。

    當提供時,options 的 navigationUI 成員會指示是否偏好在全螢幕時顯示導覽 UI。如果設定為 "show",則偏好導覽簡潔性而不是螢幕空間,如果設定為 "hide",則偏好更多螢幕空間。使用者代理程式始終可以自由地優先考慮使用者偏好而非應用程式的偏好。預設值 "auto" 表示沒有應用程式偏好。

    參數

    • 選填 options: FullscreenOptions

    傳回 Promise<void>

requestPointerLock

  • requestPointerLock(): void
  • 傳回 void

scroll

  • scroll(options?: ScrollToOptions): void
  • scroll(x: number, y: number): void
  • 參數

    • 選填 options: ScrollToOptions

    傳回 void

  • 參數

    • x: number
    • y: number

    傳回 void

scrollBy

  • scrollBy(options?: ScrollToOptions): void
  • scrollBy(x: number, y: number): void
  • 參數

    • 選填 options: ScrollToOptions

    傳回 void

  • 參數

    • x: number
    • y: number

    傳回 void

scrollIntoView

  • scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void
  • 參數

    • 可選 arg: boolean | ScrollIntoViewOptions

    傳回 void

scrollTo

  • scrollTo(options?: ScrollToOptions): void
  • scrollTo(x: number, y: number): void
  • 參數

    • 選填 options: ScrollToOptions

    傳回 void

  • 參數

    • x: number
    • y: number

    傳回 void

setAttribute

  • setAttribute(qualifiedName: string, value: string): void
  • 將元素的 qualifiedName 屬性 (第一個符合的) 值設定為 value。

    參數

    • qualifiedName: string
    • value: string

    傳回 void

setAttributeNS

  • setAttributeNS(namespace: null | string, qualifiedName: string, value: string): void
  • 將元素的 namespace 為 namespace 且 local name 為 localName 的屬性值設定為 value。

    參數

    • namespace: null | string
    • qualifiedName: string
    • value: string

    傳回 void

setAttributeNode

  • setAttributeNode(attr: Attr): null | Attr
  • 參數

    • attr: Attr

    回傳 null | Attr

setAttributeNodeNS

  • setAttributeNodeNS(attr: Attr): null | Attr
  • 參數

    • attr: Attr

    回傳 null | Attr

setPointerCapture

  • setPointerCapture(pointerId: number): void
  • 參數

    • pointerId: number

    傳回 void

toggleAttribute

  • toggleAttribute(qualifiedName: string, force?: boolean): boolean
  • 如果未提供 force,則「切換」qualifiedName,如果存在則移除,如果不存在則新增。如果 force 為 true,則新增 qualifiedName。如果 force 為 false,則移除 qualifiedName。

    如果 qualifiedName 現在存在則返回 true,否則返回 false。

    參數

    • qualifiedName: string
    • 可選 force: boolean

    回傳 boolean

webkitMatchesSelector

  • webkitMatchesSelector(selectors: string): boolean
  • 參數

    • selectors: string

    回傳 boolean

使用 TypeDoc 生成