@polymer/polymer
- Version 3.5.2
- Published
- 1.31 MB
- 1 dependency
- BSD-3-Clause license
Install
npm i @polymer/polymer
yarn add @polymer/polymer
pnpm add @polymer/polymer
Overview
The Polymer library makes it easy to create your own web components. Give your element some markup and properties, and then use it on a site. Polymer provides features like dynamic templates and data binding to reduce the amount of boilerplate you need to
Index
Functions
Classes
Functions
function html
html: (strings: TemplateStringsArray, ...values: any[]) => HTMLTemplateElement;
A template literal tag that creates an HTML element from the contents of the string.
This allows you to write a Polymer Template in JavaScript.
Templates can be composed by interpolating
HTMLTemplateElement
s in expressions in the JavaScript template literal. The nested template'sinnerHTML
is included in the containing template. The only other values allowed in expressions are those returned fromhtmlLiteral
which ensures only literal values from JS source ever reach the HTML, to guard against XSS risks.All other values are disallowed in expressions to help prevent XSS attacks; however,
htmlLiteral
can be used to compose static string values into templates. This is useful to compose strings into places that do not accept html, like the css text of astyle
element.Example:
static get template() { return html` :host{ content:"..." } ${this.partialTemplate} ${super.template} `; } static get partialTemplate() { return html
<span>Partial!</span>
; }Returns
Constructed HTMLTemplateElement
Classes
class PolymerElement
class PolymerElement extends ElementMixin(HTMLElement) {}
Base class that provides the core API for Polymer's meta-programming features including template stamping, data-binding, attribute deserialization, and property change observation.
Package Files (2)
Dependencies (1)
Dev Dependencies (26)
- @polymer/gen-closure-declarations
- @polymer/iron-component-page
- @polymer/test-fixture
- @webcomponents/webcomponentsjs
- babel-eslint
- babel-preset-minify
- del
- dom5
- eslint-plugin-html
- fs-extra
- google-closure-compiler
- gulp
- gulp-babel
- gulp-eslint
- gulp-if
- gulp-replace
- gulp-size
- gulp-vulcanize
- lazypipe
- merge-stream
- parse5
- polymer-build
- polymer-cli
- through2
- typescript
- wct-browser-legacy
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@polymer/polymer
.
- Markdown[](https://www.jsdocs.io/package/@polymer/polymer)
- HTML<a href="https://www.jsdocs.io/package/@polymer/polymer"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3791 ms. - Missing or incorrect documentation? Open an issue for this package.