Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
DOM helper library
npm install dom-lib --save
import { addClass } from 'dom-lib';
Class
hasClass: (node: HTMLElement, className: string) => boolean;
addClass: (node: HTMLElement, className: string) => HTMLElement;
removeClass: (node: HTMLElement, className: string) => HTMLElement;
toggleClass: (node: HTMLElement, className: string) => HTMLElement;
Events
on: (target: HTMLElement, eventName:string, listener:Function, capture:boolean = false)=>{ off: Function }
off: (target: HTMLElement, eventName:string, listener:Function, capture:boolean = false)=>void
Style
String getStyle(node:Element, String property)
Object getStyle(node:Element)
String getComputedStyle(node:Element, String property)
Object getComputedStyle(node:Element)
void removeStyle(node:Element, String property)
void removeStyle(node:Element, Array propertys)
void addStyle(node:Element, String property, String value)
void addStyle(node:Element, Object style)
Query
Element activeElement()
Number getHeight(node:Element, client)
Number getWidth(node:Element, client)
Object getOffset(node:Element)
Object getOffsetParent(node:Element)
Object getPosition(node:Element, offsetParent)
String getWindow(node:Element)
String nodeName(node:Element)
Object ownerDocument(Element componentOrElement)
Object ownerWindow(Element componentOrElement)
Boolean contains(Element context, node:Element)
void scrollLeft(node:Element, Number val)
void scrollTop(node:Element, Number val)
FAQs
DOM helper library
The npm package dom-lib receives a total of 68,661 weekly downloads. As such, dom-lib popularity was classified as popular.
We found that dom-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.