text: export const getScroll = (w, top) => {
    let ret = w[
      `page${top
        ? 'Y'
        : 'X'}Offset`
    ]
    const method = `scroll${top
      ? 'Top'
      : 'Left'}`
    if (typeof ret !== 'number') {
      const d = w.document
      // ie6,7,8 standard mode
      ret = d.documentElement[method]
      if (typeof ret !== 'number') {
        // quirks mode
        ret = d.body[method]
      }
    }
    return ret
  }
  