您好,欢迎来到二三四教育网。
搜索
您的当前位置:首页1-2 Release notes 发行说明

1-2 Release notes 发行说明

来源:二三四教育网

layout: default
type: about
shortname: Docs
title: Release notes
subtitle: About this release


{% include toc.html %}

<style>
.breaking {
color: red;
text-transform: capitalize;
}
</style>

(2015-11-16)

This release fixes the following issues:

  • Fixes ,
    : Fix ordering
    issues with custom-style elements that apply custom properties defined
    in other custom-style elements.

(2015-11-12)

This release includes a number of small optimizations affecting startup time.

This release includes the following new features:

  • Fixes . Add
    support for strip-whitespace attribute on templates. A template defined
    with the strip-whitespace attribute removes any empty text nodes from the
    template contents, which can result in a minor performance improvement.
  • New properties:

    • initialCount. Enables incremental rendering and sets initial render count
    • targetFramerate. Determines the target frame budget for rendering the remaining items.

    If initialCount is set, after setting (or re-setting) items, the initial count will be rendered pre-paint, and all remaining items will be incrementally rendered at requestAnimationFrame timing. The template makes a best-effort attempt to hit
    the framerate specified by targetFramerate.

  • <code><var>propertyValue</var> = <var>element</var>.getComputedStyleValue(<var>propertyName</var>);</code>

    This is equivalent to the native:

    <code><var>propertyValue</var> = getComputedStyle(<var>element</var>).getPropertyValue(<var>property</var>);

This release includes the following bug fixes and improvements:

  • Fix compound bindings with braces in literals.

(2015-10-29)

This release includes the following new features:

  • Add deepContains method to DOM API.

This release includes fixes for the following issues:

  • Make parsing of mixin declarations more robust.

(2015-10-22)

This release includes the following new features:

  • Compound binding support. In place of a single binding annotation, you
    can now use a compound binding consisting of string literals and
    binding annotations:

    <span>Name: {%raw%}{{lastname}}, {{firstname}}{%endraw%}</span>
    
    • Allows set to take paths with array keys, identified by
      <code>#<var>key</var></code>.
    • Allows notifyPath to take paths with array indices.
    • Exposes public notifySplices API.
  • Fix deepEqual on Safari 9 due to Safari enumeration bug.

  • Add Polymer.dom(node).notifyObservers method to 'kick' observers, for example,
    when attributes change under Shadow DOM.

(2015-10-08)

This release includes the following new features:

  • Added isLightDescendent and isLocalDescendent utility methods to
    {{site.project_title}} elements.

  • The fire method's detail argument can take any primitive value, not just objects.

This release fixes the following issues:

(2015-09-25)

This release fixes the following issues:

Web Components polyfill updated to 0.7.13. The latest version of webcomponents-lite.js
fixes an issue that affected SEO of Polymer 1.x apps.
{: .alert .alert-info }

(2015-09-04)

  • . Fixes a regression
    that affected legacy projects using Chrome 39.

(2015-08-28)

This release fixes a serious regression in Release 1.1 related to shady DOM distribution. Related issues:

Other fixed issues:

(2015-08-13)

Shared style change

This release includes support for a new style sharing mechanism. The new mechanism
should be used in place of <link rel="import" type="css">.

As a result of these changes, several recommendations are changing:

  • <link rel="import" type="css"> is deprecated and will eventually be removed. This syntax
    allowed users to use a pure .css file, but the file is parsed as HTML which is a
    security and performance concern.

  • We now recommend placing an element's <style> tag inside the element's local DOM
    template, not outside. The older style is still supported, but does not perform as well
    as placing the styles inside the template.

Fixed issues:

(2015-08-07)

(2015-07-23)

(2015-07-16)

(2015-07-09)

Fixed issues:

(2015-06-25)

Fixed issues:

(2015-06-17)

Fixed issues:

Documentation updates 10 June 2015

  • Documented .
  • Corrected in Migration guide to show only one mixin per @apply statement.
  • Added documentation for .
  • Moved <script> tags inside <dom-module> according to latest recommendations.
  • Updated documentation on to
    cover literal arguments and no-arg computed bindings.
  • Added notes on several more renamed element and helper methods to the .
  • Added notes about replacing template-bound and templateInstance when using the template .
  • Updated docs on to clarify element initialization order.
  • Added a note about replacing the .
  • Fixed some accessibility issues related to text contrast and bad alt text.

Release 1.0.3

Release 1.0.3 includes the following bug fixes:

Release 1.0.2

Release 1.0.2 includes the following bug fix:

  • Refactor ghost click code. ()

Release 1.0.1

Release 1.0.1 includes the following bug fixes:

  • Add sourceEvent property to track event. ()
  • Fix tap distance check:
  • Fix element.click() sending tap on IE10

Release 1.0

Release 1.0 includes the following bug fixes since 0.9:

  • Custom style system performance optimizations and parsing robustness.
  • Fixed Shady DOM style scoping on IE.
  • Avoid binding undefined string into textContent and inputs.
  • Allow behaviors to accept nested arrays of behaviors.
  • Properly update dom-repeat rendering following array mutations when both sort and filter are used.
  • Support literal strings & numbers in inline computed functions.
  • Support no-argument functions in inline computed functions.
  • Update Shady DOM distribution when using Polymer.dom(node).classList or Polymer.dom(node).setAttribute on distribution candidates.
  • Fixed gesture exception when dragging outside the document.
  • Fix ordering of behavior application.
  • Allow dom-bind to be imperatively created and filled with elements to be bound.
  • Fixed tap not firing the first time after tracking another element.
  • Fix dom-bind to ensure dependencies have resolved before stamping.
  • Fixed certain use cases of dynamically stamping a <content> using dom-if.
  • Prevent mustache content from being set to <input> value on IE.
  • Added warnings for common user mistakes.
  • Fix dom-bind from improperly scoping element classes.
  • Allow observation and binding of array.length.
  • Fix :host specificity for custom style properties.
  • Added Polymer.version property.

Documentation correction

Release 0.9

A number of APIs changed between 0.8-rc.2 and 0.9. This section summarizes the changes.

Element registration changes

<span class="breaking">breaking change:</span> Mixins replaced by behaviors

Mixins have been replaced by behaviors, which can define properties, add
lifecycle callbacks, observers, and event listeners.

Specify behaviors using the behaviors array on the prototype:

Polymer({
  is: "enhanced-element",
  behaviors: [CoolBehavior]
});

<span class="breaking">breaking change:</span> constructor renamed to factoryImpl

When creating a custom constructor, the configuration function is
renamed from constructor to factoryImpl, to aid compilation tools.

<span class="breaking">breaking change:</span> hostAttributes changes {#host-attributes}

Static attributes defined in hostAttributes can now be overridden from markup.

As a part of this change, the class attribute can no longer be set from
hostAttributes. If you need to set classes on the host, you can do so
imperatively (for example, by calling classList.add from the ready callback).

<span class="breaking">breaking change:</span> Property observer changes

The format for property observers has changed to be more like the format for computed properties:

Before:

observers: {
  'preload src size': 'updateImage'
},

updateImage: function(preload, src, size) {
  // ... do work using dependent values
}

After:

observers: [
  'updateImage(preload, src, size)'
],

updateImage: function(preload, src, size) {
  // ... do work using dependent values
}

Also, property observers are not invoked until all dependent properties are defined.
If the observer is not being invoked, make sure all dependent properties have non-undefined
default values set.

Styling changes

Custom property support

This release includes several enhancements and changes to custom property support:

  • Custom property support is enabled for all elements. The enableCustomStyleProperties
    flag is no longer required.

  • <span class="breaking">breaking change:</span> Style mixins are applied with @apply instead of mixin.

    @apply(--my-style-mixin)
    
  • The var function allows you to supply a default value, which is used if the custom
    property is not defined:

    background-color: var(--my-background, red);
    
  • Custom properties and mixins can be used inside a mixin.

    --foo: {
      color: var(--my-color);
      @apply(--my-theme);
    };
    

<span class="breaking">breaking change:</span> x-style renamed to custom-style

The custom-style element replaces the experimental x-style element.

Custom properties and CSS mixins can now be applied inside a custom-style element.

Support for :root selector

Data binding changes

<span class="breaking">breaking change:</span> Template helper elements no longer experimental

The template helper elements are no longer experimental, and have been renamed:

  • x-repeat is now dom-repeat.
  • x-bind is now dom-bind.
  • x-array-selector is now array-selector.
  • x-if is now dom-if.

Nested template support

<span class="breaking">breaking change:</span> Array mutation methods

In 0.8, an array observer was used to monitor the mutation of arrays, so adding an
item to an array was observed automatically, but changing a value in an array item required
the setPathValue method (now renamed to set).

0.9 replaces the array observers with a set of array mutation methods. For array changes
to be observed by data bindings, computed properties, or observers, you must use the provided
helper methods: push, pop, splice, shift, and unshift. Like set, the first argument
is a string path to the array.

this.push('users', { first: "Stephen", last: "Maturin" });

Gesture support

Content security policy (CSP) {#csp}

CSP issues in the initial release of 0.8 have been resolved. CSP still requires separate script and
HTML files.

vulcanize --inline-scripts --inline-css target.html | \\
    crisper --html build.html --js build.js

Note: The latest versions of vulcanize are not compatible with {{site.project_title}} 0.5.
For 0.5 projects, use vulcanize versions earlier than 1.0. vulcanize 0.7.10 is the latest version
supporting 0.5 projects.
{: .alert .alert-info }

Utility functions

<span class="breaking">breaking change:</span> transform and translate3d API changes

The method signatures for the transform and translate3d utility methods have
changed to match the other utility methods. The node argument is now the last argument,
and is optional. If node is omitted, the methods act on this.

Before:

transform(node, transform);
translate3d(node, x, y, z);

After:

transform(transform, node);
translate3d(x, y, z, node);

<span class="breaking">breaking change:</span> fire API changes

The fire method now takes three arguments:

fire(type, [detail], [options]);

The options object can contain the following properties:

  • node. Node to fire the event on. Defaults to this.
  • bubbles. Whether the event should bubble. Defaults to true.
  • cancelable. Whether the event can be canceled with preventDefault. Defaults to false.

New utilities

The following utility functions were added since 0.8-rc.2 or were missing
from the earlier documentation:

  • $$
  • cancelAsync
  • debounce
  • cancelDebouncer
  • flushDebouncer
  • isDebouncerActive

Bug fixes

Release 0.9 includes a number of bug fixes. A few notable fixes are listed below.

  • The id attribute can now be data bound. (Note that if id is data bound,
    the element is omitted from this.$.)

  • Default values are now set correctly for read-only properties.

  • An identifier with two dashes in the middle (c--foo) was improperly interpreted
    as a CSS custom property name.

  • Fixed several issues with computed bindings, including one where the computing function
    was not invoked unless its dependent property was included in another binding.

Copyright © 2019- how234.cn 版权所有 赣ICP备2023008801号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务