2 ms·
Would it? I thought the type defaulted to "text" if missing. I'd be surprised if css selectors didn't recognise that...
by mike-cardwell 16y ago
Would it? I thought the type defaulted to "text" if missing. I'd be surprised if css selectors didn't recognise that...
- pornel 16y agoCSS sees DOM attributes (what you get from element.getAttribute('type')), and not DOM properties (element.type). These are different things kept roughly in sync by setters/getters (called "reflected properties" in HTML spec). The `type` attribute is also supposed to have default value implied by the DTD, but that could only work in "validating" SGML/XML parsers (which browsers aren't).
- mike-cardwell 16y agoI didn't know that. I tested it myself and you're right. The "Elide Attributes" filter seems fairly pointless anyway. I can't imagine it making that much of a difference in performance even if it was safe.
- deleted 16y ago[deleted]