npm @polymer/polymer 2.7.0

latest releases: 3.5.1, 3.5.0, 3.4.1...
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)

Don't miss a new polymer release

NewReleases is sending notifications on new releases.