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

attached being called twice with canary #105

Closed
duralog opened this issue Oct 22, 2014 · 8 comments
Closed

attached being called twice with canary #105

duralog opened this issue Oct 22, 2014 · 8 comments

Comments

@duralog
Copy link

duralog commented Oct 22, 2014

hey guys, I love x-tags - and started using it extensively - yet no matter what I do on chrome canary, the attached callback will get called twice.

the first time, it's called when calling appendChild. the second time comes from the observer callback. if you request, I can give a screenshot - yet I think it's easy enough to reproduce.

I'm on OSX: 40.0.2195.0 canary (64-bit) ... firefox doesn't have the problem, lol

@csuwildcat
Copy link
Member

Can you just create a simple test using jsBin or jsFiddle? I can take a look this evening.

@duralog
Copy link
Author

duralog commented Oct 22, 2014

wow, that was an experience... I think I hijacked some dude's fiddle too...

see if this works for you. http://jsfiddle.net/n39wb/16/

you should see:

element goes here
created: attached! attached!

@duralog
Copy link
Author

duralog commented Oct 22, 2014

if it helps, I commented out the line, CustomElements.parser.parse(document); in the bootstrap function to continue working...

thanks a whole lot dude!

@csuwildcat
Copy link
Member

Is that line in X-Tag Core, or the Web Components polyfill we share with Polymer?

@csuwildcat
Copy link
Member

So I just looked, and it's happening on Chrome 38 mobile, the release version. The line at issue isn't in X-Tag Core, it's from the polyfill. At first blush, this looks like the polyfill not recognizing the native Web Components implementation correctly, resulting in a double call of the lifecycle callback. Can you also file this on the polyfill repo Google maintains? I can follow up with those guys to get it resolved.

@csuwildcat
Copy link
Member

Here's the repo issue section for reference: https://github.com/Polymer/webcomponentsjs-dev/issues

@pennyfx pennyfx closed this as completed Nov 17, 2014
@csuwildcat
Copy link
Member

@pennyfx can we see if sucking in the latest from their polyfills fixes this?

@csuwildcat csuwildcat reopened this Dec 1, 2014
@csuwildcat
Copy link
Member

This no longer occurs after various updates to the polyfills. If it reoccurs, please reopen.

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

3 participants