Closed Bug 647621 Opened 9 years ago Closed 5 years ago

Implement document.charset

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: emk, Assigned: emk)

References

()

Details

(Keywords: dev-doc-complete)

Attachments

(3 files)

Firefox is the only browser which lacks a support for document.charset.
Keywords: html5
I'm not sure if we actually want this...
I don't think we want the setter, for sure (not that the spec even describes what the setter should do).

The getter seems pretty painless, if redundant.
These are now in the DOM and we plan on removing them because they are quite useless.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Whiteboard: dev-doc-needed
> Whiteboard: dev-doc-needed

Is there anything to document? This is not implemented and will be removed from the spec. Documentation would generate more confusion than information.
Oh, it's already correctly documented here:
  https://developer.mozilla.org/en/DOM/document.characterSet
"The related, nonstandard method document.charset and the property document.defaultCharset are not supported by Gecko."
Keywords: html5
Whiteboard: dev-doc-needed
Should probably state this is part of http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html though. I.e. it's in a standard.
Even if it is going to be removed from the standard and it is the reason this bug marks as INVALID? I don't follow the logic.
I thought the rationale was implement because it's in a standard (we want other browsers to remove the feature). Feel free to change the resolution as you see fit.
I don't object to the resolution. It's just I don't understand why you are proposing adding a sentence such as "document.charset is in a standard" which will be valid only for a short period of time.
As this is part of the browser-agnostic part of the MDN, we usually document removed features (from spec or implementation) if they were implemented by at least one browser vendor or part of a standard (and removed in a later version).

That way people inheriting from old code that they want to adapt can find the information about why not to use this anymore (hence why it is not working in their code) and, more important, how to fix their code (using document.characterSet here).

Similarly they may be using as a reference the version of the standard with this inside and wondering why it is not working. That way they will also get valuable information (and be pointed to the latest spec).

(The fact that it is written in document.characterSet is not sufficient: if they are already at that place, they probably don't plan to use this...)

That's why I added dev-doc-needed. (INVALID bugs often give us hints about lacks in the documentation.)

Of course we put a big banner "Do not use this! Use that or that instead" in such case.
> we usually document removed features (from spec or implementation) if they were
> implemented by at least one browser vendor or part of a standard 
> (and removed in a later version).

Again:
1. This is not and was never implemented in Gecko.
2. This was never part of a final public standard. (It is currently in a Working Draft but is going to be removed there and gets probably removed from other browsers)

So this is not the typical case of "removed from standard" or "removed from Implementation".

> Similarly they may be using as a reference the version of the standard
> with this inside and wondering why it is not working.

Seems unlikely given that the current draft will change soon.

> Of course we put a big banner "Do not use this! Use that or that instead" in such case.

at least
(In reply to Masatoshi Kimura [:emk] from comment #9)
> I don't object to the resolution. It's just I don't understand why you are
> proposing adding a sentence such as "document.charset is in a standard"
> which will be valid only for a short period of time.

The document on *document.characterSet* (which is in the standard and will remain there and is implemented by Gecko already) states there is no standard. I was referring to that.
(In reply to Anne van Kesteren from comment #12)
> The document on *document.characterSet* (which is in the standard and will
> remain there and is implemented by Gecko already) states there is no
> standard. I was referring to that.
I think it should have been filed as a separate documentation bug rather than adding "dev-doc-needed" keyword here because this bug is about the property document.charset.
Disregard my previous comments. We ended up adding this to the standard as a legacy alias. My apologies emk.
Status: RESOLVED → REOPENED
Keywords: dev-doc-needed
Resolution: INVALID → ---
Comment on attachment 8664285 [details] [diff] [review]
Implement document.charset and update document.inputEncoding to the latest spec

Do we still want the deprecation warning on inputEncoding?  That is, is it really deprecated?

>+  [Historical DOM features must be removed: charset]
>+    expected: FAIL

It's in the spec, it's not removed.  Need to get this test fixed...
Attachment #8664285 - Flags: review?(bzbarsky) → review+
> Do we still want the deprecation warning on inputEncoding?  That is,
> is it really deprecated?

Hm, inputEncoding was not present in the spec when the deprecation warning was added. But it was added to the spec thereafter. So the deprecation is no longer valid.
Attachment #8664324 - Flags: review?(bzbarsky)
Attachment #8664325 - Flags: review?(Ms2ger)
Comment on attachment 8664324 [details] [diff] [review]
Undeprecate document.inputEncoding

r=me
Attachment #8664324 - Flags: review?(bzbarsky) → review+
Comment on attachment 8664325 [details] [diff] [review]
Update web-platform test

Review of attachment 8664325 [details] [diff] [review]:
-----------------------------------------------------------------

lgtm
Attachment #8664325 - Flags: review?(Ms2ger) → review+
https://hg.mozilla.org/mozilla-central/rev/2343972473da
https://hg.mozilla.org/mozilla-central/rev/21fdd0589e35
Status: ASSIGNED → RESOLVED
Closed: 9 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
"Removed from Chrome 45" is inaccurate. Chrome 45 removed the document.charset "setter". In other words, Chrome 45 made document.charset read-only.
Good catch, thanks. :jsx just updated the note.
Duplicate of this bug: 1118741
You need to log in before you can comment on or make changes to this bug.