[whatwg] Comments on <dialog>

Ryosuke Niwa rniwa at apple.com
Mon Aug 26 15:48:59 PDT 2013


On Apr 22, 2013, at 12:38 PM, Ian Hickson <ian at hixie.ch> wrote:

> On Mon, 22 Apr 2013, Matt Falkenhagen wrote:
>> 
>> 1. Browsers that don't support <dialog> will show the content by 
>> default, unlike browsers that do. Should the spec be changed to make 
>> dialogs open by default (and use a "closed" instead of "open" 
>> attribute)? Or is there another easy way to degrade gracefully for older 
>> browsers?
> 
> Putting:
> 
>   dialog { display: none }
> 
> ...in the style sheet is enough, as far as I can tell. That or just not 
> putting the element in the DOM until you need it. (In practice, on the 
> short term, you're unlikely to use this in situations without CSS and JS.)
> 
> 
>> 2. Would naming the methods open/close or show/hide instead of 
>> show/close be more natural?
> 
> The current naming is based on window.showModalDialog() and 
> window.close(). I agree the naming is weird, but being consistent is 
> probably going to be more helpful on the long run.

But that's because we have window.open but not an equivalent of window.close for window.showModalDialog, right?

It seems more consistent to use show/hide or open/close as Matt suggested.

- R. Niwa




More information about the whatwg mailing list