Skip to content
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

clone() does not work with is() #34

Closed
silverham opened this issue Feb 21, 2022 · 1 comment
Closed

clone() does not work with is() #34

silverham opened this issue Feb 21, 2022 · 1 comment

Comments

@silverham
Copy link

use Rct567\DomQuery\DomQuery;
$dom = new DomQuery('<div><p class="myclass">My words</p></div>');
$dom_clone = $dom->clone();
$is_has_the_class = $dom_clone->find('.myclass')->first()->is('.myclass'));
// Expected: TRUE, but is FALSE

$dom = new DomQuery('<div><p class="myclass">My words</p></div>');
$dom_clone = (string) $dom;
$is_has_the_class = $dom_clone->find('.myclass')->first()->is('.myclass'));
// Expected: TRUE, correct.
@IMN-MichaelL
Copy link

I can confirm this. It also breaks other functionality as well.

@Rct567 Rct567 closed this as completed in 1d6c060 Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants