showModalDialog is a terrible API, both to implement and to use. And it's relatively little used on the web. We should try to remove the last remaining usage by warning in the developer console whenever it is used. Chrome just did the same so we're not going alone.
This should be trivial, we just need to call ReportUseOfDeprecatedMethod() in nsGlobalWindow::ShowModalDialog() here, and set the message up for localization etc.
Whiteboard: good first bug
Whiteboard: good first bug → [good first bug][mentor=jdm][lang=c++]
We also have WarnOnceAbout() which appear to have the same purpose as ReportUseOfDeprecatedMethod(). I filed bug 933563 on consolidating them :)
I would like to work on it.
Assignee: nobody → riteshnpatel1994
ups I am sorry Ritesh. I have done it meanwhile.
Attachment #826031 - Flags: review?(josh)
Attachment #826031 - Flags: review?(josh) → review?(jonas)
Comment on attachment 826031 [details] [diff] [review] bug933040 Stealing review, and thanks vendo! r=jst
Attachment #826031 - Flags: review?(jonas) → review+
lower case applied
Comment on attachment 826031 [details] [diff] [review] bug933040 I'd say simply refer to window.open instead. showModalDialog() doesn't provide much value over what window.open does, other than that it's synchronous, and the synchronous part is not something that any frameworks can help with.
ok, patch updated
5 years ago
Attachment #826925 - Flags: review?(jonas) → review+
FWIW, I also filed bug 933042 on making WarnOnceAbout collect telemetry so that we know if/when it's safe to remove the implementation.
I guess this patch is ready to be checked in then.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Keywords: dev-doc-complete, site-compat
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.