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.
@statua/dialog
Advanced tools
Dialog component.
Features:
aria-hidden
on all sibling and ancestor elements except for the
currently active dialog which traps the virtual cursor inside the dialognpm install @statua/dialog --save
import dialog from '@statua/dialog';
const instance = dialog({
content: `<p>Becky</p>`
});
instance.show();
Returns: Object
Creates dialog instance. Dialog element will be appended to body
element.
Type: Object
Type: string|Node
Required
Dialog content which can be:
Node
(DOM node, HTML comment, document fragment, …)Type: Function
Default: () => {}
Callback to run when dialog instance is created.
Type: Function
Default: () => {}
Callback to run when dialog instance is destroyed.
Useful when you want to perform operations such as moving dialog content to original location if dialog content was already existing DOM node.
Type: Function
Default: () => {}
Callback to run when dialog instance is shown.
Type: Function
Default: () => {}
Callback to run when dialog instance is closed.
Type: string
Default: ``
HTML class namespace in addition to default one (statua-Dialog
).
Useful if you want to create additional styling/functionality selector hook.
Type: boolean
Default: false
Disable modal close on Escape
key press or when modal backdrop is clicked.
Show dialog.
Close dialog.
Destroy dialog instance.
Dialog instance can be controlled with certain DOM attributes.
[data-statua-dialog-action="close"]
Closes closest dialog instance when clicking on element.
Tested in IE11+ and all modern browsers.
For automated tests, run npm run test:automated
(append :watch
for watcher
support).
MIT © Ivan Nikolić
[1.2.0][] - 2020-03-16
explicitClose
option for disabling modal close when clicking on modal
backdrop or when pressing Escape
keyFAQs
Dialog component.
We found that @statua/dialog 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.
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.