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

Add synchronous API to HTMLTemplateElement for template instantiation #16

Open
ajklein opened this issue Sep 19, 2012 · 1 comment
Open

Comments

@ajklein
Copy link
Owner

ajklein commented Sep 19, 2012

Something like go() and stop(). go() would cause the template to synchronously begin processing (instantiating or iterating). stop() would cause the template to synchronously tear itself down (useful if the template is to be moved elsewhere in the tree, to avoid double-stamping).

@sorvell
Copy link

sorvell commented Sep 21, 2012

An alternative for the component upgrade use case would be to be able to set a "suspended" state on a template. When set to true suspended means a template does not stamp out regardless of the setting of instantiate/iterate, and importantly setting suspended to false would not cause the template to instantiate/iterate.

This has the advantage that when a template and its contents are moved from one place to another (e.g. during component upgrade) we can simply move existing dom rather than destroying and re-creating it (e.g. stop + move + go v. suspended=true + move + suspended=false).

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