Intent to Remove showModalDialog

90 views
Skip to first unread message

Jochen Eisinger

unread,
Feb 26, 2015, 8:22:43 AM2/26/15
to blink-dev
Primary eng (and PM) emails

Summary
The Window.showModalDialog API has been deprecated since M35 (and disabled by default since M37). We committed to keeping the implementation until end of April 2015. By that time, M42 will be the current stable channel, so we should follow through with our plan and remove it from M43.

Motivation

As detailed in the blog posts above, keeping this API would expose our users to a considerable security risk. Furthermore, the implementation results in a lot of code complexity, so just keeping it behind a flag is not a long term solution either.

We decided to support the API behind a flag for an extended deprecation period to allow for updating affected web apps. Now that this period is over, we should follow through and remove the API.

Compatibility Risk
The compatibility risk of this change is considerable as it is difficult to polyfill showModalDialog due to the modal nature, and will require in many cases considerable effort to redesign web sites around asynchronous alternatives.

Firefox has announced plans to remove support for showModalDialog as well: https://bugzilla.mozilla.org/show_bug.cgi?id=981796 however not before mid June 2015.

Alternative implementation suggestion for web developers
It won't be possible to polyfill this API 100%. Web developers will have to rewrite their applications to not depend on the blocking nature of this API. Using the <dialog> element, and ES6 generator functions it is possible to get somewhat similar behavior, see e.g. https://github.com/niutech/showModalDialog

Usage information from UseCounter
The usage of showModalDialog has dropped from 0.006% to 0.0001% since we disabled the API by default (see https://www.chromestatus.com/metrics/feature/timeline/popularity/195). We know, however, that the API is used in enterprise environments where usage reporting is commonly disabled, so those numbers have to be taken with a grain of salt.

Entry on chromestatus.com, crbug.com, or MDN

Requesting approval to remove too?
Yes

Philip Jägenstedt

unread,
Feb 26, 2015, 10:17:54 AM2/26/15
to Jochen Eisinger, blink-dev
LGTM!
> To unsubscribe from this group and stop receiving emails from it, send an
> email to blink-dev+...@chromium.org.

Dimitri Glazkov

unread,
Feb 26, 2015, 10:43:13 AM2/26/15
to Philip Jägenstedt, Jochen Eisinger, blink-dev
LGTM2.

:DG<

Chris Harrelson

unread,
Feb 26, 2015, 12:02:35 PM2/26/15
to Dimitri Glazkov, Philip Jägenstedt, Jochen Eisinger, blink-dev

LGTM3


On Thu, Feb 26, 2015, 7:43 AM Dimitri Glazkov <dgla...@chromium.org> wrote:
LGTM2.

:DG<

Philip Rogers

unread,
Feb 26, 2015, 12:51:36 PM2/26/15
to Chris Harrelson, Dimitri Glazkov, Philip Jägenstedt, Jochen Eisinger, blink-dev
Thank you for keeping with this. It's a tough one but it's best for the platform.

LGTM
Reply all
Reply to author
Forward
0 new messages