You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By placing a debugger statement in the test case and walking through, the difference is seen in the code.
In jQuery 3.6.x, we have Sizzle.getText with a combined conditional for several node types (1, 9, 11), where nodeType === 9 is for a Document object. The conditional block includes a fallback for textContent, because Document objects don't have a textContent property (only the inner <html> document element does).
In jQuery 3.7.0, the equivalent jQuery.text function has the same conditional block but now unconditionally returns elem.textContent.
The text was updated successfully, but these errors were encountered:
Krinkle
added a commit
to Krinkle/jquery
that referenced
this issue
Jun 1, 2023
When attempting to upgrade from jQuery 3.6.1 to 3.7.0 in MediaWiki, the Wikipedia ecosystem integration tests failed (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/923762). Credit to @santhoshtr for finding the root cause and the minimum test case.
Link to test case
https://codepen.io/Krinkle/pen/eYPqYWm
Other details
By placing a debugger statement in the test case and walking through, the difference is seen in the code.
In jQuery 3.6.x, we have
Sizzle.getText
with a combined conditional for several node types (1, 9, 11), wherenodeType === 9
is for a Document object. The conditional block includes a fallback fortextContent
, because Document objects don't have atextContent
property (only the inner<html>
document element does).In jQuery 3.7.0, the equivalent
jQuery.text
function has the same conditional block but now unconditionally returnselem.textContent
.The text was updated successfully, but these errors were encountered: