Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
tua-body-scroll-lock
Advanced tools
inspired by body-scroll-lock
English | 简体中文
tua-body-scroll-lock
enables body scroll locking for everything.
$ npm i -S tua-body-scroll-lock
# OR
$ yarn add tua-body-scroll-lock
tua-bsl.umd.js
)
<!-- unpkg -->
<script src="https://unpkg.com/tua-body-scroll-lock"></script>
<!-- jsdelivr -->
<script src="https://cdn.jsdelivr.net/npm/tua-body-scroll-lock"></script>
tua-bsl.umd.min.js
)
<!-- unpkg -->
<script src="https://unpkg.com/tua-body-scroll-lock/dist/tua-bsl.umd.min.js"></script>
<!-- jsdelivr -->
<script src="https://cdn.jsdelivr.net/npm/tua-body-scroll-lock/dist/tua-bsl.umd.min.js"></script>
tua-bsl.esm.browser.js
)
<!-- unpkg -->
<script type="module">
import { lock, unlock } from 'https://unpkg.com/tua-body-scroll-lock/dist/tua-bsl.esm.browser.js'
lock()
unlock()
</script>
<!-- jsdelivr -->
<script type="module">
import { lock, unlock } from 'https://cdn.jsdelivr.net/npm/tua-body-scroll-lock/dist/tua-bsl.esm.browser.js'
lock()
unlock()
</script>
tua-bsl.esm.browser.min.js
)
<!-- unpkg -->
<script type="module">
import { lock, unlock } from 'https://unpkg.com/tua-body-scroll-lock/dist/tua-bsl.esm.browser.min.js'
lock()
unlock()
</script>
<!-- jsdelivr -->
<script type="module">
import { lock, unlock } from 'https://cdn.jsdelivr.net/npm/tua-body-scroll-lock/dist/tua-bsl.esm.browser.min.js'
lock()
unlock()
</script>
import { lock, unlock } from 'tua-body-scroll-lock'
lock()
unlock()
In some scenarios, when scrolling is prohibited, some elements still need to scroll, at this point, pass the targetElement.
import { lock, unlock } from 'tua-body-scroll-lock'
const targetElement = document.querySelector('#someElementId')
lock(targetElement)
unlock(targetElement)
The
targetElement
is not required on the PC and Android.
Thanks goes to these wonderful people (emoji key):
evinma 💻 📖 🚇 🌍 | StEve Young 💻 📖 🚇 🌍 | li2go 💻 🐛 | songyan,Wang 💻 🐛 | Даниил Пронин 🐛 |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
🔐Body scroll locking that just works with everything
The npm package tua-body-scroll-lock receives a total of 50,673 weekly downloads. As such, tua-body-scroll-lock popularity was classified as popular.
We found that tua-body-scroll-lock demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.