Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Ensure newly created templates have content #310

Closed
wants to merge 3 commits into from

Conversation

kevinpschaaf
Copy link
Contributor

Part of fix for Polymer/polymer#1500

@dfreedm
Copy link
Contributor

dfreedm commented May 22, 2015

My only concern is that this will break the decorate function for templates that were created by script before DOMContentLoaded.

@garlicnation thoughts?

@kevinpschaaf
Copy link
Contributor Author

@azakus the content created by decorate at DOMContentLoaded won't stomp on content created by this createElement addition (it existence checks here: https://github.com/webcomponents/webcomponentsjs/blob/ensure-tmpl-content/src/Template/Template.js#L28).

…atively-created templates also, to support innerHTML setting before DOMContentLoaded.
@kevinpschaaf
Copy link
Contributor Author

I'll make a change so that template children are moved into content even when the template is created imperatively, so that you could innerHTML = ... an imperatively-created template and have decorate move them into the content at DOMContentLoaded time.

@garlicnation
Copy link
Contributor

Merged.

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

Successfully merging this pull request may close these issues.

3 participants