Edit in GitHubLog an issue

window.Comment

See: https://developer.mozilla.org/en-US/docs/Web/API/Comment

Comment(document, comment)

Creates an instance of Comment.

ParamType
documentDocument
commentstring

nodeName : string

Read only

nodeType : number

Read only

data : string

textContent : string

nodeValue : string

length : number

Read only

contentEditable

Read only

isConnected : boolean

Read only

parentNode : Node

Read only

parentElement : Element

Read only

firstChild : Node

Read only

lastChild : Node

Read only

previousSibling : Node

Read only

nextSibling : Node

Read only

firstElementChild : Node

Read only

lastElementChild : Node

Read only

previousElementSibling : Node

Read only

nextElementSibling : Node

Read only

childNodes : NodeList

Read only

children : HTMLCollection

Read only

ownerDocument

Read only

attributes

Read only

substringData(offset, count)

Returns: string

ParamType
offset*
count*

appendData(arg)

ParamType
argstring

insertData(offset, arg)

ParamType
offsetnumber
argstring

deleteData(offset, count)

ParamType
offsetnumber
countnumber

replaceData(offset, count, arg)

ParamType
offsetnumber
countnumber
argstring

hasChildNodes()

Returns: boolean

cloneNode(deep)

Returns: Node

ParamType
deepboolean

appendChild(child)

Returns: Node

ParamType
childNode

insertBefore(child, before)

Returns: Node

ParamType
childNode
beforeNode

replaceChild(newChild, oldChild)

Returns: Node

ParamType
newChildNode
oldChildNode

removeChild(child)

Returns: Node

ParamType
childNode

remove()

before(...nodes)

ParamType
...nodesArray<Node>

after(...nodes)

ParamType
...nodesArray<Node>

replaceWith(...nodes)

ParamType
...nodesArray<Node>

contains(node)

ParamType
nodeNode

addEventListener(eventName, callback, [capture])

ParamTypeDefault
eventName*
callback*
[capture]booleanfalse

removeEventListener(eventName, callback, [capture])

ParamTypeDefault
eventName*
callback*
[capture]booleanfalse

dispatchEvent(event)

ParamType
event*
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2023 Adobe. All rights reserved.