Polymer v2.7.0 Release Notes
Release Date: 2018-12-03 // over 5 years ago-
๐ 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)
Ensure class.html is imported before patching it. (commit)
โ Add legacy-data-mixin tests to runner. (commit)
โ Add legacy-data-mixin as 1.x->2.x migration aide. Fixes #5262. (commit)
- โ Adds