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

currentElement and DocumentFragment #164

Open
sparhami opened this issue Oct 29, 2015 · 2 comments
Open

currentElement and DocumentFragment #164

sparhami opened this issue Oct 29, 2015 · 2 comments

Comments

@sparhami
Copy link
Contributor

If a DocumentFragment is being patched and currentElement is called at the root, then it will actually return a Node and not an Element.

I'm not sure if an assert should be added or if it should be currentNode instead. It doesn't seem like a good idea to expose the node being patched from inside, so an assert making sure that it isn't called at the root might be a good idea.

@jridgewell
Copy link
Contributor

This is actually one of my needs for currentElement. But let me see if I can get around that with the new skip.

@sparhami
Copy link
Contributor Author

sparhami commented Apr 7, 2016

If this functionality is still needed, perhaps we should just add an assert that the current parent is in fact an Element rather than just casting it.

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

No branches or pull requests

2 participants