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

Accept function in legacy _template field for template parsing #5661

Merged
merged 2 commits into from
May 21, 2020

Conversation

kevinpschaaf
Copy link
Member

Polymer's _template field will now accept a template-returning function in addition to a concrete HTMLTemplateElement, to allow for lazy template parsing.

Example:

Polymer({
  is: 'lazy-template',
  _template: () => html`<div>lazy template</div>`;
});

In addition to the previously supported way:

Polymer({
  is: 'eager-template',
  _template: html`<div>eager template</div>`;
});

Reference Issue

Fixes #5660

@kevinpschaaf kevinpschaaf merged commit 76c71e1 into master May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for lazy template function in legacy _template field
3 participants