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

Add getElementsByClassName function to legacy.ts #1551

Merged
merged 3 commits into from
Dec 23, 2024
Merged

Conversation

censujiang
Copy link
Contributor

No description provided.

@fb55
Copy link
Owner

fb55 commented Jan 4, 2024

Hi @censujiang, thanks for the contribution! Could you add a simple test case to the legacy spec?

@lookus69
Copy link

will it be possible with this function get elements with multiple classes? using getElement() with options = {'class': 'className'} doesnt work fine now if the element has more than one class

@fb55 fb55 enabled auto-merge (squash) December 23, 2024 11:36
@fb55
Copy link
Owner

fb55 commented Dec 23, 2024

will it be possible with this function get elements with multiple classes? using getElement() with options = {'class': 'className'} doesnt work fine now if the element has more than one class

The easiest way to do this would be to use css-select, or to supply a custom function that checks if there is match for the class.

@fb55
Copy link
Owner

fb55 commented Dec 23, 2024

Thanks @censujiang!

@fb55 fb55 merged commit 2804ff3 into fb55:master Dec 23, 2024
7 checks passed
@coveralls
Copy link

Coverage Status

coverage: 97.995% (+0.04%) from 97.956%
when pulling 1cc12f1 on censujiang:master
into 4bd7786 on fb55:master.

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

Successfully merging this pull request may close these issues.

4 participants