
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
morphdom-hooks
Advanced tools
Lifecycle hooks for morphdom
const hooks = require('./')
const morphdom = hooks(require('morphdom'))
// create a button with some lifecycle handlers attached to it
function button () {
const b = document.createElement('button')
b.onadd = console.log.bind(console, 'button added to page!')
b.onupdate = console.log.bind(console, 'button updated in page!')
b.ondiscard = console.log.bind(console, 'button discarded from page!')
return b
}
const div0 = document.createElement('div')
document.body.appendChild(div0)
const div1 = document.createElement('div')
const button0 = button()
div1.appendChild(button0)
morphdom(div0, div1)
// logs 'button added to page!'
const div2 = document.createElement('div')
const button1 = button()
button1.style.color = 'red'
div2.appendChild(button1)
morphdom(div0, div2)
// logs 'button updated in page!'
const div3 = document.createElement('div')
morphdom(div0, div3)
// logs 'button discarded from page!'
FAQs
Lifecycle hooks for morphdom
The npm package morphdom-hooks receives a total of 40 weekly downloads. As such, morphdom-hooks popularity was classified as not popular.
We found that morphdom-hooks 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.