| May | JUN | Jul |
| 20 | ||
| 2019 | 2020 | 2021 |
COLLECTED BY
Collection: github.com
| Type | Name | Latest commit message | Commit time |
|---|---|---|---|
| Failed to load latest commit information. | |||
|
|
example |
|
|
|
|
src |
|
|
|
|
test |
|
|
|
|
.eslintrc.json |
|
|
|
|
.gitignore |
|
|
|
|
.travis.yml |
|
|
|
|
LICENSE |
|
|
|
|
README.md |
|
|
|
|
package-lock.json |
|
|
|
|
package.json |
|
|
|
|
tsconfig.json |
|
|
$ npm install --save @github/details-dialog-element
import '@github/details-dialog-element'Include with a script tag:
<script type="module" src="./node_modules/@github/details-dialog-element/dist/index.js">
<details> <summary>Open dialog</summary> <details-dialog> Modal content <button type="button" data-close-dialog>Close</button> </details-dialog> </details>
<include-fragment> element.
<details> <summary>Robots</summary> <details-dialog src="/robots" preload> <include-fragment>Loading…</include-fragment> </details-dialog> </details>The
src attribute value is copied to the <include-fragment> the first time the <details> button is toggled open, which starts the server fetch.
If the preload attribute is present, hovering over the <details> element will trigger the server fetch.
details-dialog-close
details-dialog-close event is fired from <details-dialog> when a request to close the dialog is made from
●pressing escape,
●clicking on summary, [data-close-dialog], or
●dialog.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() } })
npm install
npm test