
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
feed-view provides chat like scroll behaviour. The element's scroll, sticks to the bottom when new elements are added and doesn't jump when new elements are added above the element's scrolltop.
feed-view provides chat like scroll behaviour. The element's scroll, sticks to the bottom when new elements are added and doesn't jump when new elements are added above the element's scrolltop.
You've created an chat an and you want to add simple chat like scroll behaviour:
You can use this simple 1kb module to manage scroll behaviour for you. This module works for any html container that receives new children dynamically. If the scrolled all the way to the bottom, the bottom will stick. When new elements are added on above the current scroll view, this module will maintain the right amount of scroll.
npm i -S feed-view
const FeedView = require('feed-view');
// or
import FeedView from 'feed-view'; // if you're using es6
CDN: https://cdn.jsdelivr.net/npm/feed-view/dist/feed-view.min.js
<script src="https://cdn.jsdelivr.net/npm/feed-view/dist/feed-view.min.js"></script>
<script>
// "FeedView" is now a global variable
</script>
var container = document.querySelector('#container'); // the scrolling element
var feedView = new FeedView(container);
console.log(view.container); // the scrolling element
console.log(view.sticky); // is the scrolling element currently sticked to the bottom
Everytime you add an element or right after you've added multiple elements, call ".update()" on the feediew instance. This scrolls the scrolling element if nessecary and updates the state.
setTimeout(() => {
container.appendChild(document.createTextNode('Message 1'));
feedView.update();
}, 1000);
setTimeout(() => {
container.appendChild(document.createTextNode('Message 2'));
container.appendChild(document.createTextNode('Message 3'));
feedView.update();
}, 1000);
FAQs
feed-view provides chat like scroll behaviour. The element's scroll, sticks to the bottom when new elements are added and doesn't jump when new elements are added above the element's scrolltop.
The npm package feed-view receives a total of 2 weekly downloads. As such, feed-view popularity was classified as not popular.
We found that feed-view 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.