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

[0.9] Documentation issue (unbind & dispose) #1607

Closed
cedric-marcone opened this issue May 25, 2015 · 1 comment
Closed

[0.9] Documentation issue (unbind & dispose) #1607

cedric-marcone opened this issue May 25, 2015 · 1 comment

Comments

@cedric-marcone
Copy link
Contributor

I couldn't find anything in the documentation regarding unbinding and disposal policies when an element is detached.

In 0.5 we could play with preventDispose and cancelUnbindAll.

Any hints on the correct migration path ?

@cedric-marcone cedric-marcone changed the title [0.9] Documentation issue [0.9] Documentation issue (unbind & dispose) May 25, 2015
@kevinpschaaf
Copy link
Member

Due to the difference in binding systems, preventDispose and cancelUnbindAll are no longer relevant or necessary. Detaching an element from the DOM doesn't detach any binding connections with that element's local DOM scope like it did in 0.5.

Note that in Polymer 1.0, we currently don't support the dynamic addition or removal of elements that carry bindings to their host; for any elements with bindings in a template, it is assumed that those elements are static in the template and will not be dynamically removed. The exceptions are when using dom-repeat and dom-if, which allow for dynamic stamping of nested templates that can access their host scope and avoid leaking references related to bindings when the elements are removed.

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