Releases: Polymer/polymer
v2.7.0
New Features
- Adds
Polymer.legacyOptimizations
flag- avoids copying element templates (this disables subclassing elements from defined with
Polymer()
calls) - turns on
stripWhitespace
for all templates. - Properties defined via behaviors or the call to
Polymer()
are copied at the first instance booting up.
- avoids copying element templates (this disables subclassing elements from defined with
- Adds
Polymer.strictTemplatePolicy
flag- Strict Template Policy prevents a class of "template injection" attacks against element registration
- All "self-stamping" templates including
<dom-bind>
,<dom-repeat>
, and<dom-if>
will throw errors and not stamp if not originating from inside the template of a trusted element registered via script - Re-registration of
<dom-module>
will throw and cause template lookup for that element name to returnnull
- Elements that do not have templates by design must explicitly indicate a null template to prevent template retrieval from injected
<dom-module>
s, otherwise they will throw an error
Meaningful Changes
- Behaviors:
- Now mixed in lazily rather than at class time. This change means behaviors are no longer in the element's prototype chain.
- A memoized list of behavior lifecycle methods is constructed at finalization time and then used at runtime.
- TemplateStamp: A TreeWalker is now used to crawl through template nodes. This should be slightly faster when the ShadyDOM polyfill is used.
Polymer.telemetry
: now properly records registered elements, even if they have not been created
Raw Notes
-
Update to webcomponentsjs 1.3.0 (commit)
-
Lint fixes (commit)
-
Fix settings to pull from Polymer object for defaults. (commit)
-
Update types (commit)
-
Merge css-build-dir changes into 2.x * Don't set up observer in ShadyDOM * Move __activateDir into check instead of replace * skip some tests that never really worked in ShadyDOM (commit)
-
Use closure-safe name (commit)
-
Add tests (commit)
-
Ensure properties and observers are interleaved per behavior (commit)
-
Ensure property values are always overridden by extendors/behaviors (commit)
-
Ensure
registered
is always called on element prototype (commit) -
Do lazy behavior copying only when
legacyOptimizations
is set (commit) -
Behavior property copying fixes (commit)
-
Ensure initial static classes are preserved when a class$ binding is present. (commit)
-
Avoid copying certain properties from behaviors (commit)
-
Sync memoized properties getter with 3.x version. (commit)
-
Remove unnecessary setting of
_template
. (commit) -
Minor renaming based on review. (commit)
-
Slight tweaks based on review. (commit)
-
Slightly improve how
_registered
is called. (commit) -
Changed based on review feedback. (commit)
-
Ensure _template from behaviors takes precedence over
is
in legacy. (commit) -
TemplateStamp: fix TreeWalker (commit)
-
update types (commit)
-
update package-lock (commit)
-
Update FF test config. (commit)
-
Factor telemetry to separate module (commit)
-
update more types (commit)
-
update types (commit)
-
Address linting issues. (commit)
-
Address review feedback (commit)
-
Update types. (commit)
-
Sync with changes made in master. (commit)
-
Disable running FF in headless mode on Travis (commit)
-
Use windows for FF62 (commit)
-
Update wct for FF63, add FF62 to sauce for pre-WC testing, drop Safari 10. (commit)
-
Disable running FF in headless mode on Travis (commit)
-
Add comment and handle undefined host case. (commit)
-
Use windows for FF62 (commit)
-
Update types. (commit)
-
Behaviors (commit)
-
Update wct for FF63, add FF62 to sauce for pre-WC testing, drop Safari 10. (commit)
-
LegacyElement (commit)
-
Apply mixin to TemplatizeInstance (commit)
-
Update types. (commit)
-
Sync with changes made on master. (commit)
-
Adds
legacyOptimizations
flag (commit) -
memoize behavior method lists for fasting runtime calling. (commit)
-
stripWhitespace (commit)
-
noDirMixin (commit)
-
noCloneTemplate (commit)
-
lazyCopyProps (commit)
-
Fix prototype registration (commit)
-
Fix telemetry registrations to go eagerly (commit)
-
Use TreeWalker for template-stamp. (commit)
-
Avoid using mixins for behaviors. (commit)
-
[ci skip] update changelog (commit)
-
Fix error reporting on Safari. (commit)
-
Update types. (commit)
-
Revert to legacy template getter, update tests. (commit)
-
Fix lint warning. (commit)
-
Ensure template helpers in trusted templates work. (commit)
-
More updates based on code review. (commit)
-
Ensure instanceof works after babel ES5 compilation (commit)
-
Updates based on code review. (commit)
-
Fix update-types. (commit)
-
Update types. (commit)
-
Fix lint warnings (commit)
-
Catch errors on top window using on error Works around safari quirk when running in iframe (commit)
-
Update types. (commit)
-
Fix lint warning. (commit)
-
Fix latent (benign) error thrown when removing dom-if via innerHTML. (commit)
-
Use setting set via global Polymer object. (commit)
-
Add tests. (commit)
-
Implement opt-in
strictTemplatePolicy
(flag TBD) - disable dom-bind - disable dom-module re-registration - require elements with no template to implement null template - disable templatizer of templates not stamped in trusted polymer template (commit) -
Add comment (commit)
-
Factor out some helpers, add declarative tests. (commit)
-
Add constructor name and fix mixin wrapping. (commit)
-
Fix test name (commit)
-
Fix method to force CE polyfill on (commit)
-
Update types. ([commit](7fc956...
Stable release v3.1.0
New Features
- Added
LegacyDataMixin
to optionally use Polymer v1's behavior in handling ofundefined
in data bindings.- Intended to help larger apps transition from Polymer v1 to v3.
- Implement opt-in
strictTemplatePolicy
to protect against XSS attacks with templating- Enabling strictTemplatePolicy by calling
setStrictTemplatePolicy(true)
setting causes the following changes in behavior:- All "self-stamping" templates including
<dom-bind>
,<dom-repeat>
, and<dom-if>
will throw errors and not stamp if not originating from inside the template of a trusted element registered via script. - Template retrieval from
<dom-module>
is disabled (since templates should be defined inline in JS viastatic get template()
using thehtml
tag function). - Legacy
<dom-module>
template lookup can be re-enabled viasetAllowTemplateFromDomModule(true)
setting; under that setting, the following additional behavior will apply:- Re-registration of
<dom-module>
will throw and cause template lookup for that element name to return null. - Elements that do not have templates by design must explicitly indicate a
null
template to prevent template retrieval from inject<dom-module>
s, otherwise they will throw an error
- Re-registration of
- All "self-stamping" templates including
- Enabling strictTemplatePolicy by calling
Meaningful Changes
- A LOT of typing improvements for both Typescript and Closure compiler
- Add back ability to set
window.Polymer.sanitizeDOMValue
before Polymer loads - Fix data-binding notification events when the bound element has children.
- Make sure
static get properties()
is only read once.
Raw Notes
-
update dependencies (commit)
-
Add beforeRegister callback to externs (commit)
-
Make toggleAttribute match with native signature (#5372) (commit)
-
Fix signature of toggleAttribute to match native version (#5370) (commit)
-
Expand type of LegacyElementMixin#listen and unlisten to accept EventTargets. (commit)
-
Add TypeScript types for observer parameters. (#5359) (commit)
-
Add missing return type to attributeChanged (commit)
-
Add specific type for behaviors (commit)
-
Improve typings for legacy elements (commit)
-
Improve types of flattened-nodes-observer further. (commit)
-
Add cast for compilation (commit)
-
Only generate types once on Travis (commit)
-
Move type generation from prepack to prepare (commit)
-
Collapse imports for file into one statement (commit)
-
Add comments re: need for mixing in before metaprogramming (commit)
-
regen-package-lock (commit)
-
Don't run Firefox in headless mode. (commit)
-
Fix jsdoc syntax. (commit)
-
Updates based on code review. Add computed tests. (commit)
-
Use type generator binary instead of gulp script. (commit)
-
Add return description. (commit)
-
Grandfather defaulting sanitizeDOMValue from legacy Polymer object. (commit)
-
Minor changes to formatting and jsdoc (commit)
-
Update paths in gulpfile (commit)
-
Fix mixin jsdoc. (commit)
-
Add legacy-data-mixin as 1.x->2.x/3.x migration aide. Fixes #5262. (commit)
-
Fix jsdoc to pass lint (commit)
-
Add documentation to boot.js (commit)
-
The return type of mixinBehaviors is unknown (commit)
-
Export EventApi, same as DomApi (commit)
-
Cleanup element-mixin leftovers from modulizer (commit)
-
Use case-map lib in a saner way. (commit)
-
Fix a grab bag of closure compiler warnings. (commit)
-
Protect DomModule.import against renaming (commit)
-
Add @nocollapse for jscompiler (commit)
-
Ensure boot.js can only be parsed as a module (commit)
-
Use simpler class declaration and export form (#5325) (commit)
-
Move version to ElementMixin prototype (commit)
-
Use relative path module specifier in gen-tsd autoImport setting. (commit)
-
Update TemplateStamp event listen param types from Node to EventTarget. (#5320) (commit)
-
Add test for direct assignment to template. (commit)
-
Add a template setter to ElementMixin. (commit)
-
Export the current Polymer version in polymer-element.js (commit)
-
Make Polymer gestures library safe for Closure property renaming (take 2). (#5314) (commit)
-
Make event notification handler read the value from currentTarget, (#5313) (commit)
-
[ci skip] update changelog (commit)
-
Upstream externs changes for DomRepeatEvent (commit)
-
Back to single template getter. Add more comments. (commit)
-
Revert to legacy template getter, update tests. (commit)
-
More updates based on code review. (commit)
-
Fix allowTemplateFromDomModule opt-in (commit)
-
Fix lint warnings. (commit)
-
Updates based on code review. (commit)
-
npm upgrade dependencies (commit)
-
Fix lint warnings. (commit)
-
Catch errors on top window using uncaughtErrorFilter Works around safari quirk when running in iframe (commit)
-
Fix latent (benign) error thrown when removing dom-if via innerHTML. (commit)
-
Use setting via setStrictTemplatePolicy export. (commit)
-
Add tests. (commit)
-
Implement opt-in
strictTemplatePolicy
(flag TBD) - disable dom-bind - disable dom-module template lookup - disable templatizer of templates not stamped in trusted polymer template (commit) -
Ensure properties is only called once (commit)
-
Remove dom-module in test (commit)
Stable Release v2.6.1
Meaningful Changes
- Fix taps on elements with
disabled
property - closure compiler fixups
- Allow legacy element property definitions with only a type.
- Replace an attempt to spread a NodeList to an array with
Array.from
for Safari 9, where NodeList is not iterable. - Ignore shady CSS scoping in getComposedHTML
- Make event notification handler read the value from currentTarget
Raw Notes
-
Make event notification handler read the value from currentTarget, (#5309) (commit)
-
Regenerate types. (commit)
-
Annotate another two ephemeral classes. (commit)
-
Mark some ephemeral super classes as private. (commit)
-
Annotate Node parameter as not null. (commit)
-
Updates for improved type generation. (commit)
-
Disable combined CE+SD polyfill testing on browsers with native support, for test economy. (commit)
-
Extend Safari exceptions beyond 10.1 (commit)
-
Extend Edge exceptions beyond Edge 16 (commit)
-
Ignore shady CSS scoping in getComposedHTML (commit)
-
Update gen-typescript-declarations and generate constructor types (#5281) (commit)
-
split chrome and firefox runs, maybe fewer timeouts for firefox (commit)
-
port other fixes as well (commit)
-
Port Closure Compiler fixes to polymer-externs (commit)
-
Fix lint errors. (commit)
-
Add a test for touches on labels causing clicks on the labelled element. (commit)
-
Replace an attempt to spread a NodeList to an array with
Array.from
for Safari 9, where NodeList is not iterable. (commit) -
IE fixes (commit)
-
Use node 8 (commit)
-
Only disable tabs for "disablable" elements (commit)
-
Add
@const
to elements (commit) -
Add user-importable files to
bower.json
'smain
field for modulizer. (commit) -
Add reasoning for suppress missingProperties (commit)
-
Don't rely on dom-module synchronously until WCR. (commit)
-
Avoid closure warnings. (commit)
-
Add ability to define importMeta on legacy elements. Fixes #5163 (commit)
-
Allow legacy element property definitions with only a type. Fixes #5173 (commit)
-
Update docs. (commit)
-
Use Polymer.ResolveUrl.pathFromUrl (commit)
-
Fix test under shadydom. Slight logic refactor. (commit)
-
Fix lint warning (commit)
-
Add importMeta getter to derive importPath from modules. Fixes #5163 (commit)
-
Reference dependencies as siblings in tests. (commit)
-
Update types (commit)
-
Add note about performance vs correctness (commit)
-
Update types. (commit)
-
Lint clean. (commit)
-
Pass through fourth namespace param on attributeChangedCallback. (commit)
-
Add a @const annotation to help the Closure Compiler understand that Polymer.Debouncer is the name of a type. (commit)
-
[ci skip] update changelog (commit)
-
Update docs and types (commit)
-
Update perf test to use strict-binding-parser (commit)
-
Correct import paths (commit)
-
Only store method once for dynamic functions (commit)
-
Move strict-binding-parser to lib/mixins (commit)
-
Rename to StrictBindingParser (commit)
-
Fix linter errors (commit)
-
Extract to a mixin (commit)
-
Add missing dependency to bower.json (commit)
-
Fix linter warning (commit)
-
Add documentation (commit)
-
Add performance test for binding-expressions (commit)
-
Rewrite parser to use switch-case instead of functions (commit)
-
Remove escaping from bindings (commit)
-
Fix linter warning (commit)
-
Refactor to be functional and add more tests (commit)
-
Fix linter warnings (commit)
-
Rewrite expression parser to state machine (commit)
Stable Release v3.0.5
Stable Release v3.0.4
Stable Release v3.0.3
Meaningful Changes
- Port gestures fixes w.r.t elements with
disabled
property from 2.x - Ignore shady CSS scoping in getComposedHTML
- Typescript typings work again, as in 2.x
- Closure type fixups
Raw Notes
-
rebuild package-lock (commit)
-
Generate typings for Polymer 3. (commit)
-
Revert Promise changes. (commit)
-
Lint fixes. (commit)
-
Restore some externs. (commit)
-
Upstream a bunch of g3 changes. (commit)
-
Add no-unused-vars eslint suppressions. (commit)
-
Annotate another two ephemeral classes. (commit)
-
Mark some ephemeral super classes as private. (commit)
-
Annotate Node parameter as not null. (commit)
-
Annotate some internal classes as private. (commit)
-
Fix some appliesMixin annotations still with Polymer namespace. (commit)
-
TypeScript generator config and extra interfaces for Polymer 3. (commit)
-
Tweaks to make Polymer 3 more amenable to typings generation. (commit)
-
Fix gulp 4 issues (commit)
-
Extend Safari exceptions beyond 10.1 (commit)
-
Ignore shady CSS scoping in getComposedHTML (commit)
-
Fix method to force CE polyfill on in 3.x (commit)
-
Convert object to class for better compilation (commit)
-
regen package-lock.json (commit)
-
Update supported browsers in issue template (commit)
-
Remove modulized comment (commit)
-
Update package.lock (commit)
-
Replace .npmignore with package.json "files" option. (#5245) (commit)
-
Spelling (commit)
-
fix lint (commit)
-
Port disabled fixes from 2.x (commit)
-
Update repo URL (commit)
-
Add badges (commit)
-
[ci skip] update changelog (commit)
-
Closure extern update (commit)
-
Add user-importable files to
bower.json
'smain
field for modulizer. (commit)
Stable Release 3.0.2
Stable Release 3.0.1
Stable Release 3.0
Breaking Changes
- As announced previously, we're using ES Modules now! You'll need to convert your HTML Imports files to modules either manually, or using our modulizer tool.
- With the ES Module change, a lot of API names have shortened now that they don't use the
Polymer
global. Here's an example:- Before:
After:
<link rel="import" href="polymer/lib/utils/case-map.html"> <script>Polymer.CaseMap</script>
import {CaseMap} from "@polymer/polymer/lib/utils/case-map.js";
- Before:
- However,
Polymer.Element
becamePolymerElement
, asElement
would shadow over the nativeElement
class. importHref()
functionality is removed, please use the ES Module equivalent:import('path/to/module.js' )
- Polymer CLI tooling and Webpack will automatically fix this up for browsers that don't support ES Modules.
Raw Notes
-
use released versions of shadycss and webcomponentsjs (commit)
-
Bump dependencies (commit)
-
Run Chrome & FF serially to try and help flakiness (commit)
-
Fix lint warning (commit)
-
Bump to cli 1.7.0 (commit)
-
Removing support for returning strings from template getter. (Per previous documented deprecation: https://www.polymer-project.org/2.0/docs/devguide/dom-template#templateobject) (commit)
-
Fix typos and nits (commit)
-
Update to Gulp 4 (commit)
-
Add serve command to package.json and update package-lock.json (commit)
-
Fix for browsers that don't have input.labels. (commit)
-
Tweak introductory note, fix webpack capitalization (commit)
-
gestures: Avoid spreading non-iterable in older browsers (commit)
-
wip (commit)
-
Readme: very small tweaks (commit)
-
Tweak wording. (commit)
-
Fix link (commit)
-
Re-order sections (commit)
-
Fix LitElement typo (commit)
-
Depend on polymer-cli rather than wct (commit)
-
Minor tweaks (commit)
-
Update README for 3.x (commit)
-
Update Edge testing versions. (commit)
-
Exclude all Edge versions from keyframe/font tests. (commit)
-
Update wcjs version. (commit)
-
Use node 9 (commit)
-
Use module flags for wct (commit)
-
Use babel parser for aslant for dynamic import. (commit)
-
Fix lint errors. (commit)
-
3.0.0-pre.13 (commit)
-
[package.json] Remove version script (commit)
-
Update dependencies (commit)
-
Fix test typo on Chrome (commit)
-
Fixes IE11 test issues (commit)
-
Fixes styling tests related to using HTML Imports (commit)
-
Remove crufty global (fixes globals.html test) (commit)
-
Update to webcomponents 2.0.0 and webcomponents-bundle.js (commit)
-
Fix meaningful whitespace in test assertion (commit)
-
Fix latent mistake using old SD API (commit)
-
Add global for wct callback when amd compiling (commit)
-
Eliminate pre-module code from resolveUrl tests (commit)
-
Improve documentation and legibility. (commit)
-
Add some global whitelists (commit)
-
Fix references to js files instead of html files (commit)
-
Fix glob patterns for eslint (commit)
-
Fix ESLint warnings (commit)
-
Eliminate more canonical path usage (commit)
-
Eliminate canonical path to wcjs (commit)
-
Remove extra polymer-legacy.js imports (commit)
-
Clean up Polymer fn import (commit)
-
Add WCT config used by all tests (commit)
-
Clean up exports (commit)
-
Allow Polymer fn's call to Class to be overridden. (commit)
-
add sill-relevant, deleted tests back in (commit)
-
manually change inter-package dep imports from paths to names (commit)
-
manually add assetpath (import.meta.url) for tests that require it (commit)
-
move behavior definition to before usage (commit)
-
define omitted class declaration (commit)
-
remove < and replace with < for innerHTML (commit)
-
fixed typo causing test to fail (commit)
-
fix missing dom-module in modulization (commit)
-
revert module wait (commit)
-
wait for elements in other modules to be defined (commit)
-
no more undefined.hasShadow (commit)
-
removed link rel import type css tests (commit)
-
delete debugger (commit)
-
skip link rel import type css tests on native imports (commit)
-
add missing css html import (commit)
-
remove importHref tests (commit)
-
Import Polymer function in tests from legacy/polymer-fn.js (commit)
-
Export Polymer function from polymer-legacy.js (commit)
-
Add new wct deps. (commit)
-
Fixup a few places where comments were misplaced. (commit)
-
Fixup license comments. (commit)
-
Update package.json from modulizer's output, set polymer-element.js as main. (commit)
-
Replace sources with modulizer output. (commit)
-
Rename HTML files to .js files to trick git's rename detection. (commit)
-
Delete typings for now. (commit)
-
Add reasoning for suppress missingProperties (commit)
-
Don't rely on dom-module synchronously until WCR. (commit)
-
Avoid closure warnings. (commit)
-
Add ability to define importMeta on legacy elements. Fixes #5163 (commit)
-
Allow legacy element property definitions with only a type. Fixes #5173 (commit)
-
Update docs. (commit)
-
Use Polymer.ResolveUrl.pathFromUrl (commit)
-
Fix test under shadydom. Sli...
v2.6.0
New Features
- Added the
disable-upgrade
feature from Polymer 1 as a mixin - Add
_shouldPropertiesChange
method to customize when_propertiesChanged
is called- This method gets the current, pending, and old property values and returns a boolean. If
_shouldPropertiesChange
returns true,_propertiesChanged
is called.
- This method gets the current, pending, and old property values and returns a boolean. If
Meaningful Changes
<style include>
values are now deduplicated to prevent unexpected conflictsstatic get template() {return null}
can now be used to disable inheriting a template from a superclasstap
gesture now correctly handles thedisabled
attributeclick
will no longer be squelched if a<label for>
is tapped- Support bindings to capitalized attributes:
- Bindings of the form
<svg viewBox="[[value]]">
- Bindings of the form
Raw Notes
-
Use function instead of Set (commit)
-
[ci skip] Fix typo (commit)
-
Fix test in shady DOM (commit)
-
Deduplicate style includes (commit)
-
use a clearer test for shadowRoot (commit)
-
Returning null in template should nullify parent template (commit)
-
[ci skip] Add clarifying comment (commit)
-
Correct the JSBin version (commit)
-
Put attribute capitalization fix in property-effects (commit)
-
Add note about pre v3 releases (commit)
-
Add note for npm package (commit)
-
Add iron-component-page dev-dependency (commit)
-
Update several gulp dependencies (commit)
-
Update dom5 to 3.0.0 (commit)
-
Update Google Closure Compiler version and fix cast (commit)
-
Update types (commit)
-
Fix several issues in the documentation of dom-* elements (commit)
-
Handle
disabled
attribute correctly for tap gesture (commit) -
add test case for nested label (commit)
-
Add docs and cleanup matchingLabels (commit)
-
Add tests (commit)
-
update types (commit)
-
fix tests and add dependency import (commit)
-
fix typings (commit)
-
Ensure DisableUpgradeMixin extends PropertiesMixin (commit)
-
Format comment and remove deduping mixin (commit)
-
update types (commit)
-
update types (commit)
-
Add mixin to automatically detect capitalized HTML attributes (commit)
-
Add instructions for locally viewing the source documentation (commit)
-
Simplify condition checking in stylesFromModule function (commit)
-
Bump type generator and generate new typings. (#5119) (commit)
-
Update types (commit)
-
Fix license links (commit)
-
Fix issue with not genering the Templatizer docs (commit)
-
Bump TS type generator to pick up transitive mixin handling. (commit)
-
Remove unnecessary mutableData property from MutableData mixin (commit)
-
Update types (commit)
-
Add note to updateStyles regarding updates to CSS mixins (commit)
-
Avoid timing issues with polyfilled Promise (commit)
-
Revert use of async/await due to lack of build/serve support. (commit)
-
Revert types. (commit)
-
Update eslint parserOptions to es2017 for async/await support. (commit)
-
Use stronger check for PropertyEffects clients. Fixes #5017 (commit)
-
Remove unneeded file (commit)
-
[PropertiesChanged]: allow old data to be gc'd after
_propertiesChanged
(commit) -
Update package-lock.json (commit)
-
Make Travis update-types failure style the same as the elements. (commit)
-
Bump TypeScript generator version. (commit)
-
Make EventApi.path EventTarget type non-nullable. (commit)
-
Lint and type fixes (commit)
-
[PropertiesChanged]: adds _shouldPropertiesChange (commit)
-
Update docs: templatize() cannot be called multiple times (commit)
-
[ci skip] update changelog (commit)
-
Update types. (commit)
-
Fix JSDoc example formatting (commit)
-
Use latest webcomponents polyfill bundle (commit)
-
Fix label tap by checking matched label pairs (commit)
-
Defer creation related work via
disable-upgrade
(commit) -
lint fixes (commit)
-
Adds
Polymer.DisableUpgradeMixin
(commit)