File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ Access the value of the first node of the current selection::
230230 // descendant of the current node, excluding text from child nodes
231231 $text = $crawler->filterXPath('//body/p')->innerText();
232232 // if content is <p>Foo <span>Bar</span></p> or <p><span>Bar</span> Foo</p>
233- // innerText() returns 'Foo' and text() returns 'Foo Bar' respectively 'Bar Foo'
233+ // innerText() returns 'Foo' in both cases; and text() returns 'Foo Bar' and 'Bar Foo' respectively
234234
235235 // if there are multiple text nodes, between other child nodes, like
236236 // <p>Foo <span>Bar</span> Baz</p>
@@ -240,6 +240,11 @@ Access the value of the first node of the current selection::
240240 // but you can get the unchanged text by passing FALSE as argument
241241 $text = $crawler->filterXPath('//body/p')->innerText(false);
242242
243+ .. versionadded :: 6.3
244+
245+ The removal of whitespace characters by default in ``innerText() `` was
246+ introduced in Symfony 6.3.
247+
243248Access the attribute value of the first node of the current selection::
244249
245250 $class = $crawler->filterXPath('//body/p')->attr('class');
You can’t perform that action at this time.
0 commit comments