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 method getElementsByClassName for Element #100
Add method getElementsByClassName for Element #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. I think tests are needed.
Another thing is that the mutation report shows that the code that is moved has not been tested very well: https://dashboard.stryker-mutator.io/reports/github.com/brodybits/xmldom/master#dom.js
I don't use it before, Please explain to me more detail about what I need to do? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be much easier to understand the difference when the location of the methods would not have changed, are you able to move the two methods back to line 597?
Edit: Just understood that it was moved to a different prototype, so just ignore this comment.
We are using Stryker for mutation testing to check the quality of the code coverage. It is documented here: https://stryker-mutator.io/ |
Just to clarify:
@dungmv I think those additions are very nice to have. If you don't know how to do it it's also fine, we can help or take over, just let us know here. |
@karfau Sorry, I don't know how to do it, so can you take over it? |
…by_class_name_for_element
I just started looking into this. When I revert that change, this PR is "adding" I'll continue to work on this at some point in time (if nobody else does). |
since no standard defines it on the `Element` interface and it's always reachable as `element.ownerDocument.getElementById` xmldom#100 (comment)
This doesn't look right. According to the spec the method should return a HTMLCollection |
@shunkica the page you linked to also says that the HTMLCollection is a deprecated interface. Edit: To summarize the thread of this PR: The only thing missing for this to land is adding tests for the method on both the Document and the Element level. |
I am having trouble seeing where you found that |
In general I think every small improvement is great, not every touched code has to be 100% aligned to a spec in order to be merged. We have to go step by step, whenever somebody has capacity for something. Of course that's just my perspective, I'm totally open for more actively contributing maintainers with different opinions and happy to discuss our options. But I just discovered something: |
I made a pr to add method
getElementsByClassName
forElement
#47