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 making shady dom distribution trigger custom elements attached callbacks #2039

Closed
sorvell opened this issue Jul 7, 2015 · 0 comments
Assignees
Labels

Comments

@sorvell
Copy link
Contributor

sorvell commented Jul 7, 2015

The iron-list element uses Polymer.dom(this).appendChild to attach items. It then needs to measure the item. Since Polymer.dom is asynchronous, it needs to either call flush or measure asynchronously. However, when the custom elements polyfill is used, after the item is asynchronously attached to dom, async to that any custom elements in the item fire their attached callback. This makes it difficult for iron-list to know when it can measure.

If Polymer.dom's rendering process also called CustomElements.takeRecords() then elements like iron-list would have a clear way to know when they can measure rendered items: call this.async or Polymer.dom.flush().

@sorvell sorvell added the p1 label Jul 7, 2015
@sorvell sorvell self-assigned this Jul 7, 2015
sorvell pushed a commit that referenced this issue Jul 15, 2015
…mutations and includes an api (`Polymer.dom.addDebouncer(debouncer)`) for adding debouncers which should run at flush time. Template rendering debouncers are placed in the flush list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant