@better-scroll/observe-dom
v2.5.1
Published
Dynamic recalculating container's size for BetterScroll
Downloads
12,756
Readme
@better-scroll/observe-dom
recaculating BetterScroll's scrollHeight or scrollWidth by MutationObserver
, with this, you don't care when BetterScroll's scrollHeight or scrollWidth have changed. Plugin has done it for you.
if current browser does not surpport
MutationObserver
, it will fallback tosetTimeout
in recursion
Usage
import BScroll from '@better-scroll/core'
import ObserveDom from '@better-scroll/observe-dom'
BScroll.use(ObserveDom)
const bs = new BScroll('.wrapper', {
observeDOM: true
})