Skip to content

Implement GH-18550: Implement getElementsByClassName() #19108

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

Merged
merged 6 commits into from
Jul 14, 2025

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos linked an issue Jul 12, 2025 that may be closed by this pull request
@nielsdos nielsdos marked this pull request as ready for review July 12, 2025 18:33
@nielsdos nielsdos requested a review from kocsismate as a code owner July 12, 2025 18:33
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine, but I have a few questions as I'm slightly confused by the DOM spec.

dom_node_idx_pair start_point = dom_obj_map_get_start_point(map, nodep, index);
if (start_point.node) {
if (start_point.index > 0) {
/* Only start iteration at next point if we actually have an index to seek to. */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I did a correction here because we don't want to immediately skip the current index if the current index is already the one we need.

@nielsdos nielsdos merged commit 9121b01 into php:master Jul 14, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dom\HTMLElement::getElementsByClassName() not implemented
2 participants