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 of undefined 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 via static get template() using thehtml tag function).
      • Legacy <dom-module> template lookup can be re-enabled via setAllowTemplateFromDomModule(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

    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)

    โž• Add @export (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)