Closed
Bug 933040
Opened 11 years ago
Closed 11 years ago
Warn for showModalDialog uses
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: sicking, Assigned: vendo)
Details
(Keywords: dev-doc-complete, site-compat, Whiteboard: [good first bug][mentor=jdm][lang=c++])
Attachments
(1 file, 2 obsolete files)
2.92 KB,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
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.
Comment 1•11 years ago
|
||
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
Updated•11 years ago
|
Whiteboard: good first bug → [good first bug][mentor=jdm][lang=c++]
Reporter | ||
Comment 2•11 years ago
|
||
We also have WarnOnceAbout() which appear to have the same purpose as ReportUseOfDeprecatedMethod(). I filed bug 933563 on consolidating them :)
Updated•11 years ago
|
Assignee: nobody → riteshnpatel1994
Flags: needinfo?(nobody)
Assignee | ||
Comment 4•11 years ago
|
||
patch
Assignee | ||
Comment 5•11 years ago
|
||
ups I am sorry Ritesh. I have done it meanwhile.
Assignee | ||
Updated•11 years ago
|
Attachment #826031 -
Flags: review?(josh)
Updated•11 years ago
|
Assignee: riteshnpatel1994 → vendo.ruzicka
Updated•11 years ago
|
Attachment #826031 -
Flags: review?(josh) → review?(jonas)
Comment 6•11 years ago
|
||
Comment on attachment 826031 [details] [diff] [review]
bug933040
Stealing review, and thanks vendo! r=jst
Attachment #826031 -
Flags: review?(jonas) → review+
Comment 7•11 years ago
|
||
Comment on attachment 826031 [details] [diff] [review]
bug933040
>+# LOCALIZATION NOTE: Do not translate "Window.showModalDialog()"
>+ShowModalDialogWarning=Use of Window.showModalDialog() is deprecated. There is no short answer what to use instead, basically all JavaScript frameworks provide an alternative. For more help https://developer.mozilla.org/en-US/docs/Web/API/Window.showModalDialog
"Window" should be lower cased (except inside the URL).
Assignee | ||
Comment 8•11 years ago
|
||
lower case applied
Attachment #826031 -
Attachment is obsolete: true
Attachment #826265 -
Flags: review?(jst)
Updated•11 years ago
|
Attachment #826265 -
Flags: review?(jst) → review+
Reporter | ||
Comment 9•11 years ago
|
||
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.
Assignee | ||
Updated•11 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 10•11 years ago
|
||
ok, patch updated
Attachment #826265 -
Attachment is obsolete: true
Attachment #826925 -
Flags: review?(jonas)
Reporter | ||
Updated•11 years ago
|
Attachment #826925 -
Flags: review?(jonas) → review+
Reporter | ||
Comment 11•11 years ago
|
||
FWIW, I also filed bug 933042 on making WarnOnceAbout collect telemetry so that we know if/when it's safe to remove the implementation.
Comment 12•11 years ago
|
||
I guess this patch is ready to be checked in then.
Keywords: checkin-needed
Comment 13•11 years ago
|
||
Keywords: checkin-needed
Comment 14•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Comment 15•11 years ago
|
||
https://developer.mozilla.org/en-US/docs/Web/API/Window.showModalDialog
https://developer.mozilla.org/en-US/Firefox/Releases/28/Site_Compatibility
Keywords: dev-doc-complete,
site-compat
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•