
Security News
Google’s OSV Fix Just Added 500+ New Advisories — All Thanks to One Small Policy Change
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
@juo/visual-intersection-observer
Advanced tools
[](https://www.npmjs.com/package/@juo/visual-intersection-observer)
There is a great Intersection Observer API that allows (among others) to observe if website elements are present in the viewport or not. The missing part in that API is that one can never use Visual Viewport as the root for the IntersectionObserver
. At the time of writing, there is an open discussion regarding this issue here.
So, in other words, IntersectionObserver
works great as long as the user does not zoom the website in or out. As soon as this happens, the intersections reported by the IntersectionObserver
are invalid.
A Visual Intersection Observer
that acts as a wrapping utility for the Intersection Observer
, which modifies the rootMargin
appropriately to the Visual Viewport
.
Here's the demo to see it in action.
Layout Viewport | Visual Viewport | Both |
---|---|---|
![]() | ![]() | ![]() |
With a package manager:
npm install @juo/visual-intersection-observer
CDN:
<script src="https://unpkg.com/@juo/visual-intersection-observer"></script>
Visual Intersection Observer
works just like the Intersection Observer with one caveat: you can't specify root
option.
# ESM
import { VisualIntersectionObserver } from '@juo/visual-intersection-observer';
# UMD
const { VisualIntersectionObserver } = window['visual-intersection-observer'];
// Create an observer that logs entries to the console
const ob = new VisualIntersectionObserver((entries) => {
console.log(entries);
});
// Observe an element
ob.observe(document.getElementById('foo'));
FAQs
[](https://www.npmjs.com/package/@juo/visual-intersection-observer)
The npm package @juo/visual-intersection-observer receives a total of 4 weekly downloads. As such, @juo/visual-intersection-observer popularity was classified as not popular.
We found that @juo/visual-intersection-observer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
Research
/Security News
175 malicious npm packages (26k+ downloads) used unpkg CDN to host redirect scripts for a credential-phishing campaign targeting 135+ organizations worldwide.
Security News
Python 3.14 adds template strings, deferred annotations, and subinterpreters, plus free-threaded mode, an experimental JIT, and Sigstore verification.