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

Use correct createNodeIterator api #21

Merged
merged 2 commits into from
Apr 14, 2020

Conversation

koddsson
Copy link
Contributor

What?

Update the document.createNodeIterator call to use the correct API.

Why?

It seems that there is some backwards compatibility that allows you to pass the acceptNode directly as a third parameter to createNodeIterator as evidenced by this code working. Additionally it seems that the MDN web docs showed a example of the "old" API as well before I changed it.

This change means we are using the function as how it is described in the spec as well as allowing us to remove a @ts-ignore comment.

References

@koddsson koddsson requested a review from a team April 14, 2020 12:29
Copy link
Member

@keithamus keithamus left a comment

Choose a reason for hiding this comment

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

Yep 👍 this is good 👍

@koddsson koddsson merged commit e53342a into master Apr 14, 2020
@koddsson koddsson deleted the use-correct-create-node-iterator-api branch April 14, 2020 14:58
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.

2 participants