DOM HTML table updated

And here’s the first table updated according to the new IE8-and-up rule. It’s past time I updated the DOM Compatibility tables, even though they’re not as exciting as they were ten years ago.

These tables are mainly about innerHTML and friends, though they also detail some other properties of HTML elements, such as classList and dataset.

Unsurprisingly, all desktop browsers support nearly everything, with only Firefox holding out on not supporting innerText and outerText (though it does support outerHTML — go figure).

It turns out there are no less than three properties that say something about the page’s character set, and interesting slight browser incompatibilities. Did you know that, without you specifying UTF-8, IE and Firefox use Windows-1252 while Safari and the Blink browsers use ISO-8859-1? Now that you know, do you care? You always specify UTF-8 anyway, right? Be aware that in Safari, and only in Safari, it’s utf-8 instead of UTF-8.

Then there’s document.activeElement, which refers to the element the user is currently focusing on. That’s usually the BODY, but it could also be a form field or link. I tested it on buttons, links, and regular inputs, and only IE and Firefox support them on all three, though Firefox on Mac doesn’t do buttons (Windows and Linux do). Blink-based browsers don’t do links, and Safari does only regular inputs. Go figure.

And so on and so forth. Not the most exciting material, but the DOM HTML table now reflects the predilections of today’s desktop browsers.

I haven’t done the mobile tests yet; I’m slowly going through my device lab once again, and I am going to wait for iOS8 before embarking on actual tests.

This is the blog of Peter-Paul Koch, mobile platform strategist, consultant, and trainer. You can also follow him on Twitter.
Atom RSS

I’m around at the following conferences:

(Data from Lanyrd)

Categories:

Monthlies: