Looks really cool! But the demo link on NPM does not seem to work? You should add a Codesandbox example in this article.
Also, I think you can use DOMElement.contains() instead of the isDescendant function?
Thanks Edwin, Good points, I didn't know about the contains() method but seems like it could work, also has a great browser support!
contains()
I tried to find which is the link that doesn't work. Is it the one saying try it yourself at the npm page?
If so, you need to click on the "Logout" button to see the animation
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Looks really cool! But the demo link on NPM does not seem to work? You should add a Codesandbox example in this article.
Also, I think you can use DOMElement.contains() instead of the isDescendant function?
Thanks Edwin,
Good points, I didn't know about the
contains()
method but seems like it could work, also has a great browser support!I tried to find which is the link that doesn't work. Is it the one saying try it yourself at the npm page?
If so, you need to click on the "Logout" button to see the animation