JSPM

  • Created
  • Published
  • Downloads 100960
  • Score
    100M100P100Q147039F
  • License MIT

DOM helper library

Package Exports

  • dom-lib
  • dom-lib/lib/animation/cancelAnimationFramePolyfill
  • dom-lib/lib/animation/requestAnimationFramePolyfill

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dom-lib) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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)