WebWeWant / webwewant.fyi

If you build websites, you inevitably run into problems. Maybe there’s no way to achieve an aspect of your design using CSS. Or maybe there’s a device feature you really wish you could tap into using JavaScript. Or perhaps the in-browser DevTools don’t give you a key insight you need to do your job. We want to hear about it!
https://webwewant.fyi
MIT License
74 stars 23 forks source link

<dialog> "modal" boolean attribute #621

Open WebWeWantBot opened 1 year ago

WebWeWantBot commented 1 year ago

title:

"modal" boolean attribute date: 2023-05-06T06:10:30.702Z submitter: Jiyoung Joung number: 6455ef56496486005d09cc9f tags: [ ] discussion: https://github.com/WebWeWant/webwewant.fyi/discussions/ status: [ discussing || in-progress || complete ] related:

  • title: url: type: [ article || explainer || draft || spec || note || discussion ]

It is for the consistence of show() and showModal(). When I declare the modal dialog, you just type:

<dialog modal="modal">
   <!--something content...-->
</dialog>

or when you open the dialog by javascript, you just type:

const dialog = document.querySelector('dialog');
dialog.show( { modal: true } )

It would be nicer to declare "modal boolean attribute" because we will be able to open dialog by only one function(show()).


If posted, this will appear at https://webwewant.fyi/wants/6455ef56496486005d09cc9f/