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

Calling methods on proxies returned when querying nodes can yield different results than calling directly on impl even without shadow dom use #309

Closed
labriola opened this issue Oct 8, 2013 · 2 comments

Comments

@labriola
Copy link

labriola commented Oct 8, 2013

I realize this is intended in the case where there is ShadowDom in play, however, it seems to be affecting nodes in other situations.

A simple test case is available here. When using Canary (to avoid the polyfill) foo will have child nodes. When using the polyfill, the proxy will indicate false although the impl will indicate true.

http://jsbin.com/ulIFeHu/4/edit?html,console,output

@labriola
Copy link
Author

labriola commented Oct 8, 2013

Pretty sure it comes down to this code and method.

hasChildNodes: function() {
  return this.firstChild === null;
},

If this.firstChild is strictly null would be the only time hasChildNodes() would be true.

I believe this logic is backwards. If you agree, I already submitted a patch request and yes CLA is filed.

@labriola
Copy link
Author

labriola commented Oct 9, 2013

Fixed root cause in pull request 265 googlearchive/ShadowDOM#265

@labriola labriola closed this as completed Oct 9, 2013
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

1 participant