
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@degjs/dom-event
Advanced tools
DomEvent is a Promise-based event utility. Essentially, it wraps a Promise around a DOM event handler and resolves the Promise when the DOM event is triggered. This is especially useful when combined with other Promises to perform some action after all Promises have succeeded.
DomEvent is an ES6 module. Consequently, you may need a transpiler (Babel is a nice one) to compile DomEvent into compatible Javascript for your runtime environment.
If you're using NPM, you can install DomEvent with the following command:
$ npm install @degjs/dom-event
import domEvent from '@degjs/dom-event';
const element = document.querySelector('.some-element');
/* Get a Promise for the transitionend event on an element */
const transitionPromise = domEvent(element, 'transitionend');
/* Get another Promise for some other asynchronous task, such as an API call */
const anotherPromise = someAsyncTask();
/* Perform some action when all promises succeed */
Promise.all([transitionPromise, anotherPromise])
.then(onSuccessFunction)
.catch(onErrorFunction);
Type: Element
The DOM element that the DOM event will occur on.
Type: String
The DOM event that will trigger the Promise's success.
Breakpoints depends on the following browser APIs:
To support legacy browsers, you'll need to include polyfills for the above APIs.
FAQs
A Promise-based DOM event utility
The npm package @degjs/dom-event receives a total of 2 weekly downloads. As such, @degjs/dom-event popularity was classified as not popular.
We found that @degjs/dom-event demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.