{"_id":"scroll-doc","_rev":"3884058","name":"scroll-doc","description":"Feature detected access to the scroller element","dist-tags":{"latest":"0.2.1"},"maintainers":[{"name":"greengremlin","email":""}],"time":{"modified":"2025-09-01T01:01:24.000Z","created":"2016-02-09T23:42:13.281Z","0.2.1":"2017-11-23T07:21:19.065Z","0.2.0":"2017-10-04T17:47:44.611Z","0.1.3":"2016-02-10T00:17:16.550Z","0.1.2":"2016-02-09T23:46:37.050Z","0.1.1":"2016-02-09T23:42:13.281Z"},"users":{},"author":{"name":"Jonathan Felchlin","email":"jonathan@xgecko.com"},"repository":{"type":"git","url":"git+https://github.com/GreenGremlin/scroll-doc.git"},"versions":{"0.2.1":{"name":"scroll-doc","description":"Feature detected access to the scroller element","author":{"name":"Jonathan Felchlin","email":"jonathan@xgecko.com"},"version":"0.2.1","main":"index.js","dependencies":{},"devDependencies":{},"repository":{"type":"git","url":"git+https://github.com/GreenGremlin/scroll-doc.git"},"homepage":"https://github.com/greengremlin/scroll-doc","bugs":{"url":"https://github.com/greengremlin/scroll-doc/issues"},"keywords":["scroll","documentElement","scrollTop"],"license":"MIT","gitHead":"e4d1d1c7019f46002f5e4f681effe74b52632a66","_id":"scroll-doc@0.2.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"greengremlin","email":"jonathan@xgecko.com"},"dist":{"shasum":"168f9e9ac598743dd682c992839b44a38ce4dd91","size":1638,"noattachment":false,"key":"/scroll-doc/-/scroll-doc-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/scroll-doc/download/scroll-doc-0.2.1.tgz"},"maintainers":[{"name":"greengremlin","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scroll-doc-0.2.1.tgz_1511421678988_0.035818238044157624"},"directories":{},"publish_time":1511421679065,"_hasShrinkwrap":false,"_cnpm_publish_time":1511421679065,"_cnpmcore_publish_time":"2021-12-16T19:43:09.998Z"},"0.2.0":{"name":"scroll-doc","description":"Feature detected access to the scroller element","author":{"name":"Jonathan Felchlin","email":"jonathan@xgecko.com"},"version":"0.2.0","main":"index.js","dependencies":{},"devDependencies":{},"repository":{"type":"git","url":"git+https://github.com/GreenGremlin/scroll-doc.git"},"homepage":"https://github.com/greengremlin/scroll-doc","bugs":{"url":"https://github.com/greengremlin/scroll-doc/issues"},"keywords":["scroll","documentElement","scrollTop"],"license":"MIT","gitHead":"e9d9f8c82d6a47f7c58bfc59e235937b14b879f7","_id":"scroll-doc@0.2.0","scripts":{},"_shasum":"0337c0d7be59a1662f5572d44f7e6a52fb81c0d7","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"greengremlin","email":"jonathan@xgecko.com"},"dist":{"shasum":"0337c0d7be59a1662f5572d44f7e6a52fb81c0d7","size":1668,"noattachment":false,"key":"/scroll-doc/-/scroll-doc-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/scroll-doc/download/scroll-doc-0.2.0.tgz"},"maintainers":[{"name":"greengremlin","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scroll-doc-0.2.0.tgz_1507139264529_0.13476072810590267"},"directories":{},"publish_time":1507139264611,"_hasShrinkwrap":false,"_cnpm_publish_time":1507139264611,"_cnpmcore_publish_time":"2021-12-16T19:43:10.230Z"},"0.1.3":{"name":"scroll-doc","description":"Feature detected access to the scroller element","author":{"name":"Jonathan Felchlin","email":"jonathan@xgecko.com"},"version":"0.1.3","main":"index.js","dependencies":{},"devDependencies":{},"repository":{"type":"git","url":"git+https://github.com/GreenGremlin/scroll-doc.git"},"homepage":"https://github.com/greengremlin/scroll-doc","bugs":{"url":"https://github.com/greengremlin/scroll-doc/issues"},"keywords":["scroll","documentElement","scrollTop"],"license":"MIT","gitHead":"7acb832ca66da85e3b509f56d5d6f9c8e0616886","_id":"scroll-doc@0.1.3","scripts":{},"_shasum":"6e4c84e468d80d51d0ee809bd23bb0c31adb3c2e","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.4.1","_npmUser":{"name":"greengremlin","email":"jonathan@xgecko.com"},"dist":{"shasum":"6e4c84e468d80d51d0ee809bd23bb0c31adb3c2e","size":1717,"noattachment":false,"key":"/scroll-doc/-/scroll-doc-0.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/scroll-doc/download/scroll-doc-0.1.3.tgz"},"maintainers":[{"name":"greengremlin","email":""}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/scroll-doc-0.1.3.tgz_1455063435094_0.775644427863881"},"directories":{},"publish_time":1455063436550,"_hasShrinkwrap":false,"_cnpm_publish_time":1455063436550,"_cnpmcore_publish_time":"2021-12-16T19:43:10.466Z"},"0.1.2":{"name":"scroll-doc","description":"Feature detected access to the scroller element","author":{"name":"Jonathan Felchlin","email":"jonathan@xgecko.com"},"version":"0.1.2","main":"index.js","dependencies":{},"devDependencies":{},"repository":{"type":"git","url":"git+https://github.com/GreenGremlin/scroll-doc.git"},"homepage":"https://github.com/greengremlin/scroll-doc","bugs":{"url":"https://github.com/greengremlin/scroll-doc/issues"},"keywords":["scroll","documentElement","scrollTop"],"license":"MIT","gitHead":"e34c83924713021b1332ad66aca4d81108bd592f","_id":"scroll-doc@0.1.2","scripts":{},"_shasum":"2ac1858789556f192af59ceb2d92f1e5ef8ca039","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.4.1","_npmUser":{"name":"greengremlin","email":"jonathan@xgecko.com"},"dist":{"shasum":"2ac1858789556f192af59ceb2d92f1e5ef8ca039","size":1724,"noattachment":false,"key":"/scroll-doc/-/scroll-doc-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/scroll-doc/download/scroll-doc-0.1.2.tgz"},"maintainers":[{"name":"greengremlin","email":""}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/scroll-doc-0.1.2.tgz_1455061595667_0.5072202021256089"},"directories":{},"publish_time":1455061597050,"_hasShrinkwrap":false,"_cnpm_publish_time":1455061597050,"_cnpmcore_publish_time":"2021-12-16T19:43:10.676Z"},"0.1.1":{"name":"scroll-doc","description":"Feature detected access to the scroller element","author":{"name":"Jonathan Felchlin","email":"jonathan@xgecko.com"},"version":"0.1.1","main":"index.js","dependencies":{},"devDependencies":{},"repository":{"type":"git","url":"git+https://github.com/GreenGremlin/scroll-doc.git"},"homepage":"https://github.com/greengremlin/scroll-doc","bugs":{"url":"https://github.com/greengremlin/scroll-doc/issues"},"keywords":["scroll","documentElement","scrollTop"],"license":"MIT","gitHead":"bb21e82d64c5a8e5f3e13765dd736c109f08853a","_id":"scroll-doc@0.1.1","scripts":{},"_shasum":"7c827b0192f256f440e686cf71c8969e4dfa4c5a","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.4.1","_npmUser":{"name":"greengremlin","email":"jonathan@xgecko.com"},"dist":{"shasum":"7c827b0192f256f440e686cf71c8969e4dfa4c5a","size":1671,"noattachment":false,"key":"/scroll-doc/-/scroll-doc-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/scroll-doc/download/scroll-doc-0.1.1.tgz"},"maintainers":[{"name":"greengremlin","email":""}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/scroll-doc-0.1.1.tgz_1455061331850_0.533624452073127"},"directories":{},"publish_time":1455061333281,"_hasShrinkwrap":false,"_cnpm_publish_time":1455061333281,"_cnpmcore_publish_time":"2021-12-16T19:43:10.894Z"}},"readme":"# scrollDoc\nFeature detected access to the scroller element\n\n``` javascript\nimport scrollDoc from 'scroll-doc';\n\nconst scrollElement = scrollDoc();\n\n// scroll to the top\nscrollElement.scrollTop = 0;\n```\n\n### How it works\nScrollDoc uses feature detection to detect which element is valid for scrolling the document. It attempts to scroll 1px using document.documentElement if it succeeds, it will reset document.documentElement to it's original scroll position and return document.documentElement; if it fails, it will return document.body. The result is cached and the cached value is returned on subsequent calls.\n","_attachments":{},"homepage":"https://github.com/greengremlin/scroll-doc","bugs":{"url":"https://github.com/greengremlin/scroll-doc/issues"},"license":"MIT"}