File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,15 @@ Namespaces can be explicitly registered with the
165165 $crawler->registerNamespace('m', 'http://search.yahoo.com/mrss/');
166166 $crawler = $crawler->filterXPath('//m:group//yt:aspectRatio');
167167
168+ .. versionadded :: 4.4
169+
170+ The method ``matches() `` was introduced in Symfony 4.4.
171+
172+ Verify if the current node matches a selector::
173+
174+ $crawler->matches('p.lorem');
175+
176+
168177Node Traversing
169178~~~~~~~~~~~~~~~
170179
@@ -195,6 +204,14 @@ Get all the direct child nodes matching a CSS selector::
195204
196205 $crawler->filter('body')->children('p.lorem');
197206
207+ .. versionadded :: 4.4
208+
209+ The method ``closest() `` was introduced in Symfony 4.4.
210+
211+ Get the first parents (heading toward the document root) of the Element that matches the provided selector.
212+
213+ $crawler->closest('p.lorem');
214+
198215.. note ::
199216
200217 All the traversal methods return a new :class: `Symfony\\ Component\\ DomCrawler\\ Crawler `
@@ -337,6 +354,13 @@ and :phpclass:`DOMNode` objects::
337354
338355 The default argument of ``html() `` was introduced in Symfony 4.3.
339356
357+ .. versionadded :: 4.4
358+
359+ The method ``outerHtml() `` was introduced in Symfony 4.4.
360+
361+ $html = $crawler->outerHtml();
362+
363+
340364Expression Evaluation
341365~~~~~~~~~~~~~~~~~~~~~
342366
You can’t perform that action at this time.
0 commit comments