Questions tagged [html-5.2]

HTML 5.2 is the new release now endorsed by W3C. It has many new features, and some features were also removed, for example, the menu tag.

2 questions
2
votes
3 answers

Dialog element 'open' event

For the dialog element , is there some sort of "open" event that is fired when it is shown, either normally or as a modal? The spec isn't totally clear on this, and MDN just lists a bunch of inherited events. The close event does fire, but I…
Brad
  • 159,648
  • 54
  • 349
  • 530
1
vote
1 answer

What is the opposite of HTMLDialogElement.showModal()?

Using the HTML 5.2 native element I can open the dialog using Javascript. document.addEventListener('DOMContentLoaded', () => { const dialog = document.getElementsByTagName('dialog')[0]; dialog.showModal(); }); How can I use Javascript…
CloudBranch
  • 1,434
  • 3
  • 18
  • 23