
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
watch-element-resize
Advanced tools
A (yet another) cross-browser, event-based, element resize watcher.
A (yet another) cross-browser, event-based, element resize watcher. This is kind of a (improved) fork of sdecima/javascript-detect-element-resize.
See here a demo.
Load Javascript:
<script src="//cdn.jsdelivr.net/watch-element-resize.js/latest/watch-element-resize.min.js"></script>
Download latest release.
var watchResize = new WatchElementResize(['field1', 'field2']);
watchResize.on('resize', function(evt){
console.info(evt);
// the DOM element
var resized_element = evt.element.target;
// the element offset (width, height, top, left)
var offset = evt.element.offset;
// the window dimensions -- just in case you need
var window_size = evt.window;
});
new WatchElementResize(target)
target
can be:{String|Array<String>|Element|Array<Element>}
String or array of string, DOM node or array of nodes.
watchResize.on('resize', function(evt){
});
FAQs
A (yet another) cross-browser, event-based, element resize watcher.
We found that watch-element-resize 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.