
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.
attrs-observer
Advanced tools
Observe the DOM property change and injection condition to determine whether to modify the property
📦 Installation
npm install attrs-observer
🔨 Usage
import AttrsObserver from 'attrs-observer'
const target = document.querySelector('div')
const observer = new AttrsObserver();
observer.observe(target,
(target, from, to) => {
console.log(target, from, to)
//如果这里返回true 属性就不会设置下去
},
(target, from, to) => {
console.log(target, from, to)
}
)
//todo 这时候修改 style 或者calss 都会被检查到
observer.unobserve(target)
🖥 API
new AttrsObserver(): AttrsObserver
observe(target: HTMLElement, preHook: Hook, afterHook: Hook): AttrsObserver
开始观察
目标对象
在样式或者类名改变之前的回调 ps 如果返回 true 那么样式或者类名就不会变
在样式或者类名改变之后的回调
unobserve(target: HTMLElement): boolean
解除观察
目标对象
FAQs
Observe the DOM property change and injection condition to determine whether to modify the property
The npm package attrs-observer receives a total of 2 weekly downloads. As such, attrs-observer popularity was classified as not popular.
We found that attrs-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
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.