-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[innerText] <source> inside <audio> should always return textContent because it is never being rendered #12580
Comments
(Context: I was trying to enable https://bugzilla.mozilla.org/show_bug.cgi?id=1484048 which changes the behavior of Gecko. It would happen to align with Chromium and fail on these two tests.) |
I filed whatwg/html#3947 for display: contents, but I think this is just a Gecko bug in the innerText implementation. The spec uses I think all the tests here should output the same: <!doctype html>
<video>
<source style="display: block">
</video>
<audio>
<source id="audio-source" style="display: block">
</audio>
<canvas>
<div></div>
</canvas>
<div id="display-none" style="display: none"></div>
<pre>
<script>
function test(selector) {
let el = document.querySelector(selector);
el.textContent = "abc";
document.writeln("\"" + selector + "\" innerText: \"" + el.innerText + "\", textContent: \"" + el.textContent + "\"");
}
test("div");
test("source");
test("#audio-source");
test("#display-none");
</script>
</pre> @annevk do you agree? |
TL;DR: I think that the test and Gecko should be fixed. |
Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1484855 for that. |
This is fixed there. |
Thanks @emilio, sorry for missing your question! |
I am looking at
getter-tests.js
at here. According to the DOM spec here it asksinnerText
to return the same value as the textContent IDL attribute on this element when the element is not "being rendered".The tests here (and two lines below for
<video>
) however expect an empty string.This only passes on Gecko and marked as failing on Chromium.
Should this test be corrected?
The text was updated successfully, but these errors were encountered: