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.
    • โž• 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 return null
      • 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)