-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
Description
I once needed to find an image and compute its full URI like Symfony\Component\DomCrawler\Link::getUri is doing, but unfortunately an img element is not accepted by the Link::setNode (thus calling Crawler::link on an img element is failing.
I have extended the Crawler class to provide an image function just like the link function, but returning an Image object (a new class extending Link, but overriding setNode to accept img elements), so I can use getUri to compute a full image src URI.
I was wondering if this feature may interest other people, and maybe be merged in this repo?
If so, do you think the image method with its associated Image class is a good solution, or it's better to just allow img elements in Link::setNode?