Should the legacy HTML string methods be moved to WHATWG?

I feel that the legacy HTML string methods like String.prototype.bold shouldn't be part of the ES spec, but part of WHATWG, where it's specified maybe with some special WebIDL, and they may also be able to guide parts of it into removal as well. It just seems pointless to obligate engines to implement web compat stuff that are pure library additions, and besides, it could also give disinterested runtimes that share engines with browsers like Node.js (with V8) a way to eventually deprecate and remove those methods on their platforms as well.

The specific list I'm proposing here would be this:

  • String.prototype.anchor
  • String.prototype.big
  • String.prototype.blink
  • String.prototype.bold
  • String.prototype.fixed
  • String.prototype.fontcolor
  • String.prototype.fontsize
  • String.prototype.italics
  • String.prototype.link
  • String.prototype.small
  • String.prototype.strike
  • String.prototype.sub
  • String.prototype.sup

I also suspect many of these may be removable as well, though that would likely happen after the migration to the HTML spec:

  • String.prototype.big - the element itself was removed as of HTML 5, but it's still supported in browsers
  • String.prototype.blink - the element itself was never an official standard and was dropped back in the old IE days, so I expect breakage to be absurdly low here
  • String.prototype.fixed - the element itself was removed as of HTML 5 but is still supported in browsers, though given <code> does almost the same thing, I suspect usage is fairly low
  • String.prototype.fontcolor - the element itself was removed as of HTML 5 but is still supported in browsers
  • String.prototype.fontsize - the element itself was removed as of HTML 5 but is still supported in browsers
  • String.prototype.strike - the element itself was removed as of HTML 5 but is still supported in browsers, though given <s> does almost the same thing, I suspect usage is fairly low

Thoughts?

Only web browsers are obligated to implement these.

I know. That's part of where I'm coming from. Unlike, say, legacy octal literals or document.all objects, it's not syntax engines have to be able to parse or semantics that deeply screw with implementation, and the methods are very blatantly HTML-specific with almost no use case outside of them.

It just seems wrong to have that part of the ES spec when in reality it quacks more like a legacy HTML feature than a core language feature.

3 Likes