A subset of DOM Level 4 model for tests in Node.js
A lightweight library for testing DOM structures in isolation. Implemented methods and properties are specified below:
HTMLDocument |
---|
document.createAttribute |
document.createComment |
document.createElement |
document.createTextNode |
Element |
---|
addEventListener |
appendChild |
attributes |
childElementCount |
children |
classList |
className |
contains |
dataset |
firstChild |
firstElementChild |
getAttribute |
hasChildNodes |
insertBefore |
lastChild |
lastElementChild |
nodeName |
nodeType |
parentElement |
parentNode |
remove |
removeAttribute |
removeEventListener |
setAttribute |
style |
replaceChild |
removeChild |
tagName |
Comment |
---|
nodeName |
nodeType |
parentElement |
parentNode |
remove |
textContent |
Text |
---|
nodeName |
nodeType |
parentElement |
parentNode |
remove |
textContent |
NodeList |
---|
entries |
forEach |
keys |
length |
values |
( get node by index ) |
( iterate ) |
HTMLCollection |
---|
item |
length |
( get element by index ) |
CSSStyleDeclaration |
---|
getPropertyValue |
item |
length |
removeProperty |
setProperty |
( get style by index ) |
DOMTokenList |
---|
add |
contains |
forEach |
keys |
length |
remove |
toggle |
values |
( iterate ) |
( get token by index ) |
DOMStringMap |
---|
( get property by name ) |
( set property by name ) |
NamedNodeMap |
---|
getNamedItem |
removeNamedItem |
setNamedItem |
item |
length |
( get attribute by name ) |
( get attribute by index ) |
Attr |
---|
name |
value |