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

Cannot modify a template's contents while it is stamping #330

Closed
sorvell opened this issue Oct 25, 2013 · 2 comments
Closed

Cannot modify a template's contents while it is stamping #330

sorvell opened this issue Oct 25, 2013 · 2 comments
Assignees

Comments

@sorvell
Copy link
Contributor

sorvell commented Oct 25, 2013

If dom is inserted into a template's content while it is stamping out, e.g. via createInstance, problems can occur. For example, sub-templates do not correctly maintain their 'ref' property. Given:

<template id="T">
    <x-a>
        <template id="Ta">
            <div id="foo"></div>
  • createInstance is called on #T
  • when it's created, x-a inserts a childNode inside itself.

The resulting stamped #Ta will lose its ref property and therefore cannot find it's template (#foo is lost).

@ghost ghost assigned sorvell Oct 25, 2013
@rafaelw
Copy link
Contributor

rafaelw commented Aug 14, 2014

I don't understand.

@sorvell
Copy link
Contributor Author

sorvell commented Aug 14, 2014

Hmm, I thought it was something like the following but this appears to totally work now so closing this.

http://jsbin.com/ciyah/1/edit

@sorvell sorvell closed this as completed Aug 14, 2014
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