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

Consider deferring attached to emulate 1.0 callback timing #3933

Closed
kevinpschaaf opened this issue Sep 10, 2016 · 2 comments
Closed

Consider deferring attached to emulate 1.0 callback timing #3933

kevinpschaaf opened this issue Sep 10, 2016 · 2 comments

Comments

@kevinpschaaf
Copy link
Member

From @sorvell on August 29, 2016 21:27

Related issues: #71, #96.

In 1.0, elements were ensured to be readied before being attached. This allowed use of local dom and (at lease naive) measurement in attached.

This was achieved specifically by deferring attached until after ready if the system tried to call it too soon.

We could retain this guarantee without explicitly deferring attached by readying (flushing) an element before attaching its local dom. This would change the guarantees around ready. Specifically, it would be unsupported to look at shadowRoot in ready.

Perhaps we should simply add back the defer attached behavior from 1.0 to ensure as little breakage for users of the 'legacy' api as possible.

Copied from original issue: PolymerLabs/alacarte#102

@sorvell
Copy link
Contributor

sorvell commented Sep 10, 2016

This will likely not be addressed in Polymer.Element where we are not inclined to introduce new lifecycle (attached). Based on feedback we'll see if we need to add guidance around how to account for this.

sorvell pushed a commit that referenced this issue Sep 13, 2016
Ensure dom is attached after is has been readied.
@kevinpschaaf
Copy link
Member Author

Resolved via #3947

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants