dom-lib
DOM helper library
Install
npm install dom-lib --save
Example
import { addClass } from 'dom-lib';
Documnets
Class
hasClass(node,className)
addClass(node,className)
removeClass(node,className)
Events
on()
off()
onFocus()
Query
canUseDOM
activeElement()
contains(context, node)
getContainer(container, defaultContainer)
getHeight(node, client)
getOffset(node)
getOffsetParent(node)
getPosition(node, offsetParent)
getScrollbarSize(recalc)
getWidth(node, client)
getWindow(node)
isOverflowing(container)
nodeName(node)
ownerDocument(componentOrElement)
ownerWindow(componentOrElement)
scrollLeft(node, val)
scrollTop(node, val)
Style
getStyle(node, property)
removeStyle(node, property)
addStyle(node, property, value)