-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
In https://www.w3.org/Bugs/Public/show_bug.cgi?id=27877 @bzbarsky brought up that element interfaces are not greatly defined in the current spec. In #1012 we are trying to nail them down better, but I am sticking to basically what the current spec says. There are a couple notable instances where browsers deviate from the more-precise version in #1012.
For clarity, #1012 includes:
- If name is bgsound, blink, isindex, multicol, nextid, or spacer, return HTMLUnknownElement.
- If name is acronym, basefont, big, center, listing, nobr, noembed, noframes, plaintext, rb, rtc, strike, tt, or xmp, return HTMLElement.
- Otherwise, if this specification defines an interface appropriate for the element type corresponding to the local name name, return that interface.
- If other applicable specifications define an appropriate interface for name, return the interface they define.
- If name is a valid custom element name, return HTMLElement.
- Return HTMLUnknownElement.
It is these first two steps I want to focus on.
With the help of https://jsbin.com/liticisino/edit?html,console, which goes through all elements listed as "obsolete" in the spec, and tests across Chrome, Firefox, and Edge, I have noted the following issues:
| Element(s) | Spec | Chrome | Firefox | Edge | Safari |
|---|---|---|---|---|---|
| applet | HTMLAppletElement | HTMLUnknownElement | HTMLAppletElement | HTMLAppletElement | HTMLAppletElement |
| xmp, listing | HTMLElement | HTMLPreElement | HTMLElement | HTMLPreElement | HTMLPreElement |
| blink | HTMLUnknownElement | HTMLUnknownElement | HTMLUnknownElement | HTMLElement | HTMLUnknownElement |
| rb, rtc | HTMLElement | HTMLElement | HTMLElement | HTMLUnknownElement | HTMLElement |
| marquee | HTMLMarqueeElement | HTMLMarqueeElement | HTMLDivElement | HTMLMarqueeElement | HTMLMarqueeElement |
| basefont | HTMLElement | HTMLElement | HTMLElement | HTMLBaseFontElement | HTMLBaseFontElement |
These all seem like browser bugs except applet (#454) and maaaybe xmp/listing. It would be good to fill in the Safari parts of the table though, and to see what implementers think. /cc @DigiTec who I know has been looking into this somewhat recently.