Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@webcomponents/template

webcomponents26.8kBSD-3-Clause1.5.1TypeScript support: included

HTML template element polyfill

readme

template

A minimal polyfill for <template>.

Known limitations

Template nodes in main document are upgraded after DOMContentLoaded

The first timepoint in which the polyfill can be certain the main document is loaded is DOMContentLoaded. As such, we use this timepoint to bootstrap any <template> as defined in the main document. This means that any scripts in the main document that run before this event (e.g. inline scripts) will not have the properly upgraded templates. Instead, listen for DOMContentLoaded yourself and only after that interact with any <template> in the main document.

License

Everything in this repository is BSD style license unless otherwise specified.

Copyright (c) 2016 The Polymer Authors. All rights reserved.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[1.5.1] - 2023-03-30

  • Update dependencies (#542)

[1.5.0] - 2021-08-02

  • Add TS externs. (#457)

[1.4.4] - 2020-10-21

  • Maintenance release (no user-facing changes)

[1.4.3] - 2020-07-20

  • Maintenance release (no user-facing changes)

[1.4.2] - 2020-03-16

  • Maintenance release (no user-facing changes)