Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
I needed full control over popup animation and its lifecycle.
Install it from NPM:
npm i lit-popup
Include css from node_modules/lit-popup/dist/css/lit-popup.min.css (or write your own)
<div class="lit-popup" data-lit-popup="popup">
<div class="lit-popup-container">
<!-- Layout here -->
</div>
</div>
import LitPopup from 'lit-popup';
const popup = new LitPopup('name');
Hook | Parameters | Description |
---|---|---|
onOpen | (instance: LitPopup) | Runs before opening animation |
onOpenComplete | (instance: LitPopup) | Runs after opening animation |
onClose | (instance: LitPopup) | Runs before closing animation |
onCloseComplete | (instance: LitPopup) | Runs after closing animation |
onDestroy | (instance: LitPopup) | Runs when 'destroy' method is called |
openAnimation | (instance: LitPopup) | A function describing an opening animation. It must return a promise and resolve when animation is done. |
closeAnimation | (instance: LitPopup) | A function describing a closing animation. It must return a promise and resolve when animation is done. |
Event | Parameters | Description |
---|---|---|
open | none | Triggers before opening animation |
open-complete | none | Triggers after opening animation |
close | none | Triggers before closing animation |
close-complete | none | Triggers after closing animation |
destroy | none | Triggers when 'destroy' method is called |
Method | Parameters | Return | Description |
---|---|---|---|
open | none | Promise<void> | Opens the modal |
close | none | Promise<void> | Closes the modal |
destroy | none | void | Destroys the instance, disposes memory |
on | (eventName: string, listener: Function) | void | Adds an event listener to the popup element |
one | (eventName: string, listener: Function) | void | Adds an event listener to the popup element which will be executed only once |
off | (eventName: string, listener: Function) | void | Removes an event listener from the popup element which will be executed only once |
trigger | (eventName: string) | void | Triggers an event on the popup element |
Work on progress
FAQs
A modern popup module with no dependencies.
The npm package lit-popup receives a total of 0 weekly downloads. As such, lit-popup popularity was classified as not popular.
We found that lit-popup 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.