
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
@octoper/details-dialog-element
Advanced tools
A modal dialog that's opened with a <details> button.
Based on Github's <details-dialog-element>
but removed support for <include-fragment>
element.
$ npm install --save @octoper/details-dialog-element
import '@octoper/details-dialog-element'
<details>
<summary>Open dialog</summary>
<details-dialog>
Modal content
<button type="button" data-close-dialog>Close</button>
</details-dialog>
</details>
details-dialog-close
details-dialog-close
event is fired from <details-dialog>
when a request to close the dialog is made from
summary, [data-close-dialog]
, ordialog.toggle(false)
This event bubbles, and can be canceled to keep the dialog open.
document.addEventListener('details-dialog-close', function(event) {
if (!confirm('Are you sure?')) {
event.preventDefault()
}
})
Browsers without native custom element support require a polyfill.
npm install
npm test
Distributed under the MIT license. See LICENSE for details.
FAQs
A modal dialog opened with a <details> button.
The npm package @octoper/details-dialog-element receives a total of 1 weekly downloads. As such, @octoper/details-dialog-element popularity was classified as not popular.
We found that @octoper/details-dialog-element 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
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.