Skip to content

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
Contributor

@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.

3 participants