Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TIL about showModal (from small things big things one day come)

TIL about showModal (from small things big things one day come)

modal dialogs:
- the `dialog` element, its `open` attribute and its `showModal` and `close` methods
- the `inert` attribute
- a lightbox implemented as progressive enhancement

links to resources and codepens at https://noti.st/gunnarbittersmann/GBW9Pt/til-about-showmodal-from-small-things-big-things-one-day-come

Gunnar Bittersmann

January 13, 2023
Tweet

More Decks by Gunnar Bittersmann

Other Decks in Programming

Transcript

  1. big things one day come from small things TIL about

    showModal
  2. None
  3. dialog The dialog element represents a part of an application

    that a user interacts with to perform a task, for example a dialog box, inspector, or window.
  4. None
  5. inert The inert attribute is a boolean attribute that indicates,

    by its presence, that the element and all its fl at tree descendants which don’t otherwise escape inertness (such as modal dialogs) are to be made inert by the user agent.
  6. None
  7. show Modal The showModal method displays the dialog element and

    makes it the top-most modal dialog.
  8. None
  9. big things one day come from small things TIL about

    showModal