Closed
Bug 743574
Opened 12 years ago
Closed 12 years ago
Deprecate DOMException.code
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: emk, Assigned: emk)
References
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 1 obsolete file)
DOMException.code is deprecated per DOM4 spec.
Assignee | ||
Comment 1•12 years ago
|
||
Adding a deprecation warning.
Comment 2•12 years ago
|
||
Are we planning to remove support? It seems not too useful to warn for things that aren't broken, and won't be.
Assignee | ||
Comment 3•12 years ago
|
||
If an existing IndexedDB/File API code uses .code to identify the error, it will be surely broken. Also, we used to removed many non-broken things (taintEnabled, xmlVersion, isSameNode, etc.) That said, I have no plan to remove .code at the moment (then what the DOM4 deprecation means?).
I'm a little bit worried about warning here. I agree that for code that uses IndexedDB or FileAPI exceptions, we are going to break people that are using DOMException.code. However I'd expect it to be much much more common to use DOMException.code in code that uses older DOM APIs, such as normal Node manipulation etc. For those people, warning them doesn't do a lot of good. They likely need their code to work on older browsers where .name isn't available or doesn't have the new standardized names, and writing different code paths for Gecko is likely just a pain with no real gain. So basically I'm worried that we're going to stick a warning in people's developer console, with no good alternative for what they should used instead. So I'm worried people are just going to ignore this warning which lessens the value of warnings in general. So basically I think we should wait with checking this patch in until in a year or two when it would make more sense for developers to use .name for all exceptions.
Assignee | ||
Comment 5•12 years ago
|
||
Then what about this? This patch relies on patches of bug 730161.
Attachment #613190 -
Attachment is obsolete: true
Attachment #613190 -
Flags: review?(jonas)
Attachment #613428 -
Flags: review?(jonas)
Assignee | ||
Updated•12 years ago
|
Attachment #613428 -
Attachment description: Deprecate DOMException.code only the code was changed (IndexedDB or File API) or is useless (zero) → Warn use of DOMException.code only when the code was changed (IndexedDB or File API) or is useless (zero)
Comment on attachment 613428 [details] [diff] [review] Warn use of DOMException.code only when the code was changed (IndexedDB or File API) or is useless (zero) SOLD to the awesome Kimura-san!
Attachment #613428 -
Flags: review?(jonas) → review+
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed,
dev-doc-needed
Comment 8•12 years ago
|
||
(In reply to Ryan VanderMeulen from comment #7) > https://hg.mozilla.org/integration/mozilla-inbound/rev/4b667b134bc7 Backed out whole merge for bustage per Yoric (Bug 743574): https://hg.mozilla.org/integration/mozilla-inbound/rev/12e42fb8e321
Target Milestone: mozilla14 → ---
Updated•12 years ago
|
Keywords: checkin-needed
Comment 9•12 years ago
|
||
Disregard that; PEBKAC. Did not get backed out. I misread TBPL.
Keywords: checkin-needed
Target Milestone: --- → mozilla14
Comment 10•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4b667b134bc7
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 11•12 years ago
|
||
Backed out: https://hg.mozilla.org/mozilla-central/rev/af7263971ad4
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 12•12 years ago
|
||
(In reply to Ehsan Akhgari [:ehsan] from comment #11) > Backed out: https://hg.mozilla.org/mozilla-central/rev/af7263971ad4 This bug is cursed.
Comment 13•12 years ago
|
||
(In reply to Ehsan Akhgari [:ehsan] from comment #11) > Backed out: https://hg.mozilla.org/mozilla-central/rev/af7263971ad4 Ehsan, that changeset doesn't appear to have anything to do with this bug. Furthermore, per comment 9, this was never actually backed out AFAIK.
Assignee | ||
Comment 14•12 years ago
|
||
Closing again because this is not really backed out.
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Comment 15•12 years ago
|
||
Mentioned on https://developer.mozilla.org/en/Firefox_14_for_developers#DOM https://developer.mozilla.org/en/DOM/DOMException
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•