Implement document.charset

RESOLVED FIXED in Firefox 44

Status

()

--
enhancement
RESOLVED FIXED
8 years ago
2 years ago

People

(Reporter: emk, Assigned: emk)

Tracking

({dev-doc-complete})

unspecified
mozilla44
dev-doc-complete
Points:
---

Firefox Tracking Flags

(firefox44 fixed)

Details

(URL)

Attachments

(3 attachments)

(Assignee)

Description

8 years ago
Firefox is the only browser which lacks a support for document.charset.

Updated

8 years ago
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.

Comment 3

7 years ago
These are now in the DOM and we plan on removing them because they are quite useless.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INVALID
Whiteboard: dev-doc-needed

Comment 4

7 years ago
> 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.

Comment 5

7 years ago
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

Comment 6

7 years ago
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.
(Assignee)

Comment 7

7 years ago
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.

Comment 8

7 years ago
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.
(Assignee)

Comment 9

7 years ago
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.

Comment 11

7 years ago
> 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

Comment 12

7 years ago
(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.
(Assignee)

Comment 13

7 years ago
(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.

Comment 14

3 years ago
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 → ---
(Assignee)

Comment 15

3 years ago
Created attachment 8664285 [details] [diff] [review]
Implement document.charset and update document.inputEncoding to the latest spec

https://treeherder.mozilla.org/#/jobs?repo=try&revision=9449c14f74b7
Assignee: nobody → VYV03354
Status: REOPENED → ASSIGNED
Attachment #8664285 - Flags: review?(bzbarsky)
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+
(Assignee)

Comment 17

3 years ago
Created attachment 8664324 [details] [diff] [review]
Undeprecate document.inputEncoding

> 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)
(Assignee)

Comment 18

3 years ago
Created attachment 8664325 [details] [diff] [review]
Update web-platform test
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
Last Resolved: 7 years ago3 years ago
status-firefox44: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
(Assignee)

Comment 25

3 years ago
"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.
Keywords: dev-doc-needed → dev-doc-complete
Duplicate of this bug: 1118741
You need to log in before you can comment on or make changes to this bug.