Stable Release v1.9.0
New Features
Two new properties were added to all Polymer elements for forward-compatibility with 2.0 (for use in "2.0 hybrid" elements): importPath
and rootPath
.
The importPath
property defaults to the element's HTMLImport document URL path.
The rootPath
property defaults to the main document URL's path but may be globally overridden via Polymer = { rootPath: '...' }
prior to loading polymer.html
.
Inside element templates, users can now use property binding (e.g. src$="[[importPath]]foo.jpg"
or src$="[[rootPath]]foo.png"
) to explicitly declare what the URL is relative to, rather than relying on Polymer 1.x's automatic URL rewriting, which has been removed in 2.x.
It may be useful to override rootPath
to provide a stable application mount path when using client side routing so that an element template can refer to "application absolute" paths.
Raw Notes
-
[ci skip] skip looking in build log, again (commit)
-
[ci skip] backport changelog fixes (commit)
-
- allow setting
rootPath
- disallow setting
importPath
(this is supported in 2.x but not 1.x) (commit)
- allow setting
-
Add
importPath
androotPath
to support 2.x hybrid compatible elements. (commit) -
[ci skip] Update Changelog (commit)
-
Add missing semicolon after variable assignment (commit)
-
Update PRIMER.md (commit)