Comment
Extends: CharacterData
See: https://developer.mozilla.org/en-US/docs/Web/API/Comment
-
- new Comment(document, comment)
- .nodeName :
string - .nodeType :
number - .data :
string - .textContent :
string - .nodeValue :
string - .length :
number - .contentEditable
- .isConnected :
boolean - .parentNode :
Node - .parentElement :
Element - .firstChild :
Node - .lastChild :
Node - .previousSibling :
Node - .nextSibling :
Node - .firstElementChild :
Node - .lastElementChild :
Node - .previousElementSibling :
Node - .nextElementSibling :
Node - .childNodes :
NodeList - .children :
HTMLCollection - .ownerDocument
- .attributes
- .substringData(offset, count)
- .appendData(arg)
- .insertData(offset, arg)
- .deleteData(offset, count)
- .replaceData(offset, count, arg)
- .hasChildNodes()
- .cloneNode(deep)
- .appendChild(child)
- .insertBefore(child, before)
- .replaceChild(newChild, oldChild)
- .removeChild(child)
- .remove()
- .before(...nodes)
- .after(...nodes)
- .replaceWith(...nodes)
- .contains(node)
- .addEventListener(eventName, callback, [capture])
- .removeEventListener(eventName, callback, [capture])
- .dispatchEvent(event)
new Comment(document, comment)
Creates an instance of Comment.
comment.nodeName : string
Read only
comment.nodeType : number
Read only
comment.data : string
comment.textContent : string
comment.nodeValue : string
comment.length : number
Read only
comment.contentEditable
Read only
comment.isConnected : boolean
Read only
comment.parentNode : Node
Read only
comment.parentElement : Element
Read only
comment.firstChild : Node
Read only
comment.lastChild : Node
Read only
comment.previousSibling : Node
Read only
comment.nextSibling : Node
Read only
comment.firstElementChild : Node
Read only
comment.lastElementChild : Node
Read only
comment.previousElementSibling : Node
Read only
comment.nextElementSibling : Node
Read only
comment.childNodes : NodeList
Read only
comment.children : HTMLCollection
Read only
comment.ownerDocument
Read only
comment.attributes
Read only
comment.substringData(offset, count)
Param
Type
offset
\*count
\*comment.appendData(arg)
Param
Type
arg
stringcomment.insertData(offset, arg)
Param
Type
offset
numberarg
stringcomment.deleteData(offset, count)
Param
Type
offset
numbercount
numbercomment.replaceData(offset, count, arg)
Param
Type
offset
numbercount
numberarg
stringcomment.hasChildNodes()
comment.cloneNode(deep)
Param
Type
deep
booleancomment.appendChild(child)
Param
Type
child
comment.insertBefore(child, before)
comment.replaceChild(newChild, oldChild)
comment.removeChild(child)
Param
Type
child
comment.remove()
comment.before(...nodes)
Param
Type
...nodes
comment.after(...nodes)
Param
Type
...nodes
comment.replaceWith(...nodes)
Param
Type
...nodes
comment.contains(node)
Param
Type
node
comment.addEventListener(eventName, callback, [capture])
Param
Type
Default
eventName
\*callback
\*[capture]
booleanfalsecomment.removeEventListener(eventName, callback, [capture])
Param
Type
Default
eventName
\*callback
\*[capture]
booleanfalsecomment.dispatchEvent(event)
Param
Type
event
\*