Polymer v3.1.0 Release Notes
Release Date: 2018-10-26 // over 5 years ago-
๐ 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
- 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)
๐ Fixed typos on lines 133 and 157 (#5409) (commit)
๐ Fix signature of toggleAttribute to match native version (#5370) (commit)
โก๏ธ Update jsdoc for PropertyEffects.splice (#5367) (commit)
Expand type of LegacyElementMixin#listen and unlisten to accept EventTargets. (commit)
โก๏ธ Update gen-closure-declarations to 0.5.0 (#5360) (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)
Cleanup modulizer conversion leftovers (#5347) (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)
โ Remove unnecessary @const. (commit)
โ Add return description. (commit)
0๏ธโฃ 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)
โ Remove undocumented logging feature (#5331) (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)
Ensure unresolved.js is an es module (#5324) (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)
- โ Added