[whatwg] Comments on <dialog>
ojan at chromium.org
Mon Aug 26 18:44:37 PDT 2013
On Mon, Aug 26, 2013 at 5:40 PM, Ian Hickson <ian at hixie.ch> wrote:
> On Mon, 26 Aug 2013, Ryosuke Niwa wrote:
> > On Apr 22, 2013, at 12:38 PM, Ian Hickson <ian at hixie.ch> wrote:
> > >
> > > 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.
> Consistent with what? We have window.open()/window.close, and
> window.showModalDialog()/window.close(). We also have
> document.open()/document.close(), and so on (EventSource, etc). I suppose
> we could change show() to open(), but then we'd be inconsistent with
> showModalDialog() for openModal()...
IMO, showModalDialog is the legacy broken API we're stuck with. Better to
name the new thing in a way that's self-consistent and consistent with
everything else (i.e. openModal).
More information about the whatwg