Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
vue-element-spy
Advanced tools
Plugin for detecting when element reaches top of the viewport. The plugin uses Intersection Observer.
yarn add vue-element-spy
import Vue from 'vue'
import VueElementSpy from 'vue-element-spy'
Vue.use(VueElementSpy)
<script src="vue.js"></script>
<script src="/node_modules/vue-element-spy/dist/vue-element-spy.js"></script>
Vue.use(VueElementSpy)
It's possible to set refreshInterval
option for periodical spies refresh. Use if content changes or reflows without scrolling.
Default: 250
Disable: 0
Vue.use(VueElementSpy, {refreshInterval: 500})
v-vue-element-spy
observes whether the target element is at the top of the viewport and calls callback
.
<div v-vue-element-spy="{callback: myCallback}">
<!-- or shortened syntax -->
<div v-vue-element-spy="myCallback">
Callback function. Two arguments are passed: boolean whether element is reached top, target element.
Set greedy
value to false
if you want to observe bottom of the target and get notified when the whole element leaves viewport.
Default: true
Set offset
value if you want to move activation point in px.
Default: 0
By default all spies are in one global context and if second target reaches viewport then first target becomes inactive.
Set outOfContext
value if you don't want the target to be affected by other spies.
Default: false
If you want a bunch of spies to be moved to separate context add v-vue-element-spy-context
to any of the ancestor elements. By default all spies are in common global context and only one target can be active at a time.
<div v-vue-element-spy-context>
<h1 v-vue-element-spy="myCallback">Title 1</h1>
<h1 v-vue-element-spy="myCallback">Title 2</h1>
<h1 v-vue-element-spy="myCallback">Title 3</h1>
</div>
FAQs
Vue.js plugin for detecting when element reaches top of the viewport. The plugin uses Intersection Observer.
The npm package vue-element-spy receives a total of 14 weekly downloads. As such, vue-element-spy popularity was classified as not popular.
We found that vue-element-spy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.