Bug 74819 - Remove document.charset and document.defaultCharset
Summary: Remove document.charset and document.defaultCharset
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-18 13:15 PST by Anne van Kesteren
Modified: 2011-12-22 11:01 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anne van Kesteren 2011-12-18 13:15:31 PST
Gecko only supports document.characterSet and that is the one DOM4 will keep. The others will be removed from the standard as they do not seem necessary for legacy compatibility.
Comment 1 Alexey Proskuryakov 2011-12-20 09:24:48 PST
Document.defaultCharset is not an alias for charset, so let's not discuss it here. Perhaps you meant inputEncoding? If you'd actually like us to consider removing defaultCharset, please file a separate bug, although my initial answer will be similar to the one below.

Both document.charset and document.inputEncoding are well established in standards, and should not be removed from implementations. See <http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html> and <http://www.w3.org/TR/DOM-Level-3-Core/core.html#Document3-inputEncoding> respectively.

I would suggest the following course of action: specify all of charset, characterSet and inputEncoding, the latter two being deprecated. Document.charset is writable, and that trait can also be deprecated as far as I know, but it needs research. Implementations will not remove support for any of these in foreseeable future.

The reason why I suggest making charset the non-deprecated one is that it has the longest history in major browsers, and is best known to web developers.
Comment 2 Anne van Kesteren 2011-12-22 05:50:38 PST
I meant document.charset and document.defaultCharset, neither of which is listed in either of the documents you cite.
Comment 3 Alexey Proskuryakov 2011-12-22 11:01:34 PST
My mistake, charset is not in any W3C spec indeed. Still, it's supported in vast majority of browsers, and removing support from WebKit would be counter-productive.

If you actually meant defaultCharset, then why did you report both in the same bug? It's a completely different feature.