-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should innerText have a blocklist of elements it doesn't work on? #2222
Comments
It's also worth noting that textContent works on all these elements, which argues to me that there's no principled reason to prevent innerText from working on them. |
For context: The set of elements is web-platform-tests/wpt#4403 (comment) |
WebKit was doing this to match IE. Since Edge no longer behaves this way and since no longer throwing should be fairly safe compatibility wise, I think it would be OK to align WebKit with the specification. Of course , this is provided that Blink devs agree to do the same. |
No, we knew about the blocklist, but Gecko decided to not copy it since it seemed unlikely to be necessary for Web compat. See #1679
Also tested at web-platform-tests/wpt#3491 IE had a similar blocklist for |
Yeah, I don't see a good reason to have the blocklist. We can just remove it. I've filed a bug on Chrome https://bugs.chromium.org/p/chromium/issues/detail?id=679069 |
Yeah, agreed. Just hoping to get an official Blink implementer OK, then we're good to go and can merge the various web platform test PRs. Maybe the crbug triage process will get us there sooner than pinging people on GitHub :) |
I think this is fine. I'll change Blink after the upstream test changes land. |
Great. It sounds like this is settled. What remains is to merge web-platform-tests/wpt#3491 and web-platform-tests/wpt#4403 and then file bugs on browsers. \o/ |
Filed/commented:
Thanks all! And @zcorpan, sorry for not realizing this was already on your radar. Hopefully we can all go through the rest of your web platform test PRs soon. |
And we just fixed the bug (assuming it doesn't end up reverted) https://bugs.chromium.org/p/chromium/issues/detail?id=679069#c8 |
See previous discussion in web-platform-tests/wpt#4403 (comment) with @sleevi. I wrote some tests, which are in web-platform-tests/wpt#4403 (live at http://w3c-test.org/submissions/4403/innerText/setter.html) which show that:
My instinct is that we should stick with the current spec and file bugs on Blink and WebKit, but I'd love to hear from implementers in Blink and WebKit what they think. @foolip @tkent-google @cdumez ?
(* = menuitem only is blocked in Chrome when the flagged menuitem implementation is turned on.)
Note that the spec for innerText is relatively new (#1678, 2016-08-17) so it's not as if this was a deliberate "spec violation" from Blink/WebKit: it's more just that when performing the reverse-engineering process for speccing innerText, we didn't think to test elements besides
<div>
.The text was updated successfully, but these errors were encountered: