Releases: Polymer/polymer
Stable Release v1.8.0
New Features
Suppress notification events
- New global setting:
Polymer = { suppressTemplateNotifications: true }
- suppresses
dom-change
andrendered-item-count
events fromdom-if
,dom-repeat
, anddom-bind
. Users can opt back intodom-change
events by setting thenotify-dom-change
attribute (notifyDomChange: true
property) todom-if
/dom-repeat
instances.
- suppresses
- New global setting:
Polymer = { suppressBindingNotifications: true }
- disables notify effects when propagating data downward via bindings. Generally these are never useful unless users are explicitly doing something like
<my-el foo="{{foo}} on-foo-changed="{{handleFoo}}">
(which is generally unnecessary since the host element doing the binding can use afoo
observer) or callingaddEventListener('foo-changed', ...)
on an element wherefoo
is bound. We attempted to make this the default some time back but needed to revert it when we found via #3077 that users were indeed doing this in corner-case scenarios. Users that avoid these patterns can enjoy the potentially significant benefit of suppressing unnecessary events during downward data flow by opting into this flag.
- disables notify effects when propagating data downward via bindings. Generally these are never useful unless users are explicitly doing something like
disable-upgrade
attribute
Adds a disable-upgrade
attribute API for all Polymer elements when global opt-in setting Polymer = { disableUpgradeEnabled: true }
is set. This is a lightweight feature useful for performance tuning an application, giving fine-grained control over individual element instantiation cost.
When an element is marked with the disable-upgrade
attribute, its createdCallback
will return early without performing any of the normal Polymer element initialization steps (e.g. stamping template, setting default properties, running observers, etc.). The element will behave similar to an element that has not had its definition loaded, except that it will actually have the correct prototype (as such, methods should not be called on the element until its disable-upgrade
attribute has been removed).
Removing the disable-upgrade
attribute will then cause the element to boot up, initialize its properties, stamp its template, etc.
Note this feature is implemented as an attribute API only. There is no corresponding disableUpgrade
property. As such, any bindings should be via attribute bindings, e.g. <my-element disable-upgrade$="{{!loggedIn}}">
.
Meaningful Changes
<template strip-whitespace>
The strip-whitespace
attribute is now recursive to descendant templates, stripping whitespace from nested <template is="dom-repeat">
and <template is="dom-if>
elements.
Raw Notes
- Add comment. (commit)
- Only keep
disable-upgrade
attribute if it is an attribute binding. (commit) - spacing. (commit)
- Update webcomponentsjs dependency (commit)
- Change
isInert
todisable-upgrade
and feature is now supported only via thedisable-upgrade
attribute. (commit) - Add tests for
is-inert
(commit) - Prevent annotator from removing the
is-inert
attribute. (commit) - fixes for users of Polymer.Class (commit)
- Add support for
isInert
to allow elements to boot up in an inert state. e.g.<x-foo is-inert></x-foo>
. SettingxFoo.isInert = false
causes the element to boot up. (commit) - Small typos updated (commit)
- work around older firefox handling of the "properties" property on HTMLElement prototype (commit)
- improve comments (commit)
- Add comments. Behavior fast copy flag changed to
_noAccessors
. (commit) - Fix tests on IE10 and simplify constructor shortcut. (commit)
- Make dom-module work on older Safari. (commit)
- micro-optimizations: (1) favor mixin over extends where possible, (2) unroll behavior lifecycle calls, (3) avoid creating a custom constructor when not used, (4) provide
_skipDefineProperty
setting on behaviors which copies properties via assignment rather thancopyOwnProperty
(commit) - Ensure done. (commit)
- Test positive case of suppressBindingNotifications (commit)
- Add notifyDomBind to dom-bind. (commit)
- Test Polymer.Settings inside test. (commit)
- Revert unnecessary change. (commit)
- Fix test lint issue. (commit)
- Add global flags to suppress unnecessary notification events. Fixes #4262. *
Polymer.Settings.suppressTemplateNotifications
- disablesdom-change
andrendered-item-count
events fromdom-if
,dom-repeat
, anddon-bind
. Users can opt back intodom-change
events by setting thenotify-dom-change
attribute (notifyDomChange: true
property) todom-if
/don-repeat
instances. *Polymer.Settings.suppressBindingNotifications
- disables notify effects when propagating data downward via bindings. Generally these are never useful unless users are explicitly doing something like<my-el foo="{{foo}} on-foo-changed="{{handleFoo}}">
or callingaddEventListener('foo-changed', ...)
on an element wherefoo
is bound (we attempted to make this the default some time back but needed to revert it when we found via #3077 that users were indeed doing this). Users that avoid these patterns can enjoy the potentially significant benefit of suppressing unnecessary events during downward data flow by opting into this flag. (commit) - Fix
strip-whitespace
for nested templates. (commit) - [ci skip] update changelog v1.7.1 (commit)
- Close backtick in ISSUE_TEMPLATE.md (commit)
Stable Release v1.7.1
Meaningful Changes
- Fix for
<slot>
to<content>
transform that broke text distribution- Caveats of the transform: all named slots must come before unnamed slots in the DOM. Details here: #4109 (comment)
- Memory leak fix in the
fire
method for IE - Memory leak fix in the
importHref
method - Fix for stale values from
getComputedStyleValue
Raw Notes
- Remove dependency on WebComponets for IE detection (commit)
- Make sure text nodes are distributed when translating slot to content (commit)
- always use the document listener (commit)
- Add tests for no-gesture interop (commit)
- fix lint error (commit)
- Use document-wide passive touch listener to update ghostclick blocker target (commit)
- only need to recalc if styleProperties missing (commit)
- simpler implementation, only recompute when using shim variables (commit)
- [ci skip] update travis.yml from 2.0 (commit)
- Always update style properties when calling getComputedStyleValue (commit)
- Add tests (commit)
- Fix #4123: Memory leak when using
importHref
(commit) - Prevent _showHideChildren from being called on placeholders. (commit)
- fix broken link to Google JavaScript syle guide in documentation (commit)
- Better explanation thanks to @kevinpschaaf (commit)
- [ci skip] fix changelog title (commit)
- [ci skip] Update Changelog for 1.7.0 (commit)
- Resolving issue #1745 with Polymer docs (commit)
- fixed broken tests/missing web components (commit)
- 3430 - ie memory leak fixes - disable event caching, fixed resolver url adding to root doc, and weak map ie issues (commit)
- Briefly explain how to split element definition (commit)
- Fix copy&pasted comment (commit)
Stable Release v1.7.0
New Features
Forward Compatibility with 2.0
<slot>
element
In order to provide a smooth migration path from Polymer 1.x to 2.x, we've enabled elements to opt-in to using the new <slot>
element, and ::slotted()
CSS selector from ShadowDOM v1.
This is not required for current Polymer 1.x elements, but using the new syntax will make it easier to port elements to 2.x. (More details about transitioning to <slot>
here).
Elements using <slot>
and ::slotted()
will be transformed to the equivalent use of <content>
and ::content
like this example:
As written:
<dom-module id="x-forward-compat">
<template>
<style>
#container ::slotted(.foo) {
color: red;
}
#namedContainer ::slotted(*) {
border: 2px solid black;
}
</style>
<div id="namedContainer">
<slot name="named"></slot>
</div>
<div id="container">
<slot></slot>
</div>
</template>
</dom-module>
After runtime transform:
<dom-module id="x-forward-compat">
<template>
<style>
#container ::content > .foo {
color: red;
}
#namedContainer ::content > * {
border: 2px solid black;
}
</style>
<div id="namedContainer">
<content select="[slot=named]"></content>
</div>
<div id="container">
<content></content>
</div>
</template>
</dom-module>
html
selector in <style is="custom-style">
, :host > *
selector in elements
Another Polymer 2.x change is removing the :root
selector and replacing it with html
in <style is="custom-style">
, and :host > *
in element styles.
This release allows for using both html
and :root
in <style is="custom-style">
, and using both :root
and :host > *
in element styles
Meaningful Changes
- Fixed an accessibility issue with iOS related to the
tap
event. - Improved performance of a workaround for stale styles in IE
Raw Notes
- Fix IE style cache performance (commit)
- no need for :root to be first in the selector (commit)
- fix tests on !chrome browsers (commit)
- Translate
:root
to:host > *
for element styles (commit) - Define checkRoot only once (commit)
- Fix normalizeRootSelector (commit)
- Comment on using the ast walker to replace selector (commit)
- update travis config (commit)
- Transform ::slotted() to ::content (commit)
- Test on native shadow DOM also. (commit)
- Reorder. (commit)
- Remove unused. (commit)
- Add fallback support/test. (commit)
- A little more dry. (commit)
- Use name. (commit)
- Support default slot semantics. (commit)
- Remove opt-in. Exclude content from copy. (commit)
- Make sure click events can always trigger tap, even on touch only devices (commit)
- Add support for slot->content transformation. Need to bikeshed opt-in attribute (currently "auto-content") (commit)
- Support more expressive
:root
andhtml
selectors (commit) - Fix typo (commit)
- test for mixins in custom-style ordering (commit)
- Do not insert semicolon when fixing var() syntax (commit)
- Make sure mixins are applied no matter the ordering of definition (commit)
- Update gulp-eslint to 3.x (commit)
- Fixes #3676: retain
<style>
in<template preserve-content/>
(commit) - [ci skip] Update Changelog for v1.6.1 (commit)
- Apply to _marshalArgs. (commit)
- Rename Path.head() to Path.root(). (commit)
- Use head in templatizer (commit)
- Modify _annotationPathEffect (commit)
- Use isDescendant (commit)
- Use isDeep (commit)
- Replace _fixPath. (commit)
- Replace _modelForPath. (commit)
- Replace _patchMatchesEffect. (commit)
- Add path library. (commit)
- Revert "Fix _patchMatchesEffect. (#3631)" (commit)
v1.6.1
New Features
Settings
-
noUrlSettings
- This option restricts changing Polymer settings to a script in the page, removing URL query params, such as
?dom=shadow
- This option restricts changing Polymer settings to a script in the page, removing URL query params, such as
-
lazyRegister
has a new experimental flag setting:max
.- When
lazyRegister
is set tomax
,behaviors
are evaluated at the first element instance, which places a few new restrictions on the behaviors.
When lazyRegister is 'max' defer all behavior work until first element creation. When set, a behavior cannot setup an element's `is` or custom constructor via defining `factoryImpl`. We do call beforeRegister on the prototype to preserve the ability to use it in ES6. This orders the element prototype's `beforeRegister` before behaviors' rather than after, as in the normal case.
- When
Meaningful Changes
Styling Fixes
inherit
and initial
- CSS property values
inherit
andinitial
now have much more spec-compliant behavior.- With native custom CSS properties, the value
inherit
is not supported for non-inheritable properties.
- With native custom CSS properties, the value
- native custom CSS properties now support reusing a mixin name for a custom property definition.
Data System
- Properties set on elements before they upgrade now override attributes.
- Attributes with URLs that begin
/
or a prototcol will no longer be recalculated when stamping templates.
Input handling
- Browsers supporting the Input Device Capabilities spec now have much better support on devices with both touchscreen and mouse inputs.
Raw Notes
- Property Shim needs to handle build output from apply shim (commit)
- Do not resolve urls with leading slash and other prototcols (commit)
- Mark that non-inheritable properties being set to
inherit
is not supported (commit) - Put
getInitialValueForProperty
on ApplyShim (commit) - Skip
initial
andinherit
on IE 10 and 11 (commit) - Handle mixins with property values of inherit and initial (commit)
- Split tests for use-before-create and reusing mixin names for variables (commit)
- Make sure we don't populate the mixin map for every variable (commit)
- [apply shim] Track dependencies for mixins before creation (commit)
- [property shim] Make sure "initial" and "inherit" behave as they would natively (commit)
- fix lint issue. (commit)
- Fixes #3801. Ensure style host calculates custom properties before element. This ensures the scope's styles are prepared to be inspected by the element for matching rules. (commit)
- Clean up custom-style use of apply shim (commit)
- gate comparing css text on using native css properties (commit)
- Only invalidate mixin if it defines new properties (commit)
- Make __currentElementProto optional for build tool (commit)
- Rerun Apply Shim when mixins with consumers are redefined (commit)
- updateNativeStyles should only remove styles set by updateNativeStyles (commit)
- [ci skip] add smoke test for scope caching with custom-style (commit)
- Remove unused arg. (commit)
- Remove dirty check for custom events; unnecessary after #3678. Fixes #3677. (commit)
- Use _configValue to avoid setting readOnly. Add tests. (commit)
- Missing piece to fixing #3094 (commit)
- Opt in to "even lazier" behavior by setting
lazyRegister
to "max". This was done to preserve compatibility with the existing feature. Specifically, when "max" is used, settingis
inbeforeRegister
and definingfactoryImpl
may only be done on an element's prototype and not its behaviors. In addition, the element'sbeforeRegister
is called before its behaviors'beforeRegisters
rather than after as in the normal case. (commit) - Replace 'iff' with 'if and only if' (commit)
- Fix test in IE10. (commit)
- cleanup check for sourceCapabilities (commit)
- Fix #3786 by adding a
noUrlSettings
flag to Polymer.Settings (commit) - Fix mouse input delay on systems with a touchscreen (commit)
- Ensure properties override attributes at upgrade time. Fixes #3779. (commit)
- Refresh cache'd styles contents in IE 10 and 11 (commit)
- change travis config (commit)
- Fix css shady build mistakenly matching root rules as host rules (commit)
- [ci skip] update changelog for v1.6.0 (commit)
- Make lazyRegister have 'even lazier' behavior such that behaviors are not mixed in until first-instance time. (commit)
- need takeRecords in complex var example (commit)
- add reduced test case (commit)
- Replace VAR_MATCH regex with a simple state machine / callback (commit)
- Expose an
lazierRegister
flag to defer additional work until first create time. This change requires that a behavior not implement a custom constructor or set the element'sis
property. (commit) - Improve type signatures:
Polymer.Base.extend
andPolymer.Base.mixin
(commit) - Fix for changing property to the same value (commit)
- Include iron-component-page in devDependencies (commit)
- Ensure fromAbove in _forwardParentProp. (commit)
v1.6.0
New Features
-
Added support for native custom CSS properties.
To use, set
lazyRegister: true
anduseNativeCSSProperties: true
in Polymer settings (e.g.<script> Polymer = {lazyRegister: true, useNativeCSSProperties: true};</script>
before importingpolymer.html
).Enabling the feature only impacts browsers that support native custom CSS properties (Chrome and Firefox; Safari 9+ supports custom properties, but is buggy and thus opted out for now). On these browsers, normal custom CSS properties such as
--custom-property: value
will use native properties; custom CSS mixins such as--custom-mixin: { ... }
and their@apply
points of usage will be destructured into individual custom properties once at registration time such that native properties are used for all custom properties. This eliminates all instance time work related to the custom property shim, which should provide substantial performance gains.Caveats: When native custom properties are in use, Polymer's
updateStyles(...)
API is supported with one exception: callingupdateStyles
to change the value of custom CSS mixins is not supported. -
Integrated support for polymer-css-build
The CSS build performs Shady DOM CSS selector shimming as well as destructuring custom CSS mixins to individual properties, which can help eliminate all runtime cost of Shady DOM style shimming, as well as all runtime cost of custom property shimming (on browsers with native CSS properties). Achieving optimal results may require selectively serving different built CSS depending on client capabilities. See that repo for details on how to run the build.
-
Added support for defining CSS custom properties in
@media
queriesThe following use of CSS custom properties inside
@media
rules is now supported, allowing for dynamic change of custom property values based on screen size, etc.:<style> @media (max-width: 400px) { :host { --gutter-width: 16px; } } </style>
Meaningful Changes
- The custom property shim will now correctly re-calculate custom property style values when global
<style is="custom-style">
elements are loaded async (e.g. via use of lazy-loading). importHref()
will now ensure lazily-loaded element definitions result in tree-order upgrades when using polyfill, which should result in more deterministic behavior when using lazy-loading patterns.observers
/computed
functions will always receive the current value of a property, which addresses errors due to potentially stale values that can occur when a property value is changed synchronously in its own observer.
Raw Notes
- Fix test to account for pseudo element differences x-browser. (commit)
- Restore functionality of selectors like
:host(.foo)::after
. (commit) - add comment. (commit)
- re-support selectors like
:host[inline]
since this was previously supported under shady-dom. (commit) - fix linting (commit)
- Add test for not matching
x-foox-bar
given:host(x-bar)
used insidex-foo
(commit) - fix test in IE/FF. (commit)
- simplify :host fixup (commit)
- Fixes #3739: correctly shim
:host(.element-name)
aselement-name.element-name
. (commit) - Fixes #3734: address HI/CE timing issue in importHref. Fixes upgrade time dependencies of scripts on previous elements in async imports. (commit)
- Ensure element scope selectors are updated correctly when updateStyles is called when element is not in dom. (commit)
- add comment. (commit)
- remove unneeded flag. (commit)
- Fixes #3730 and inspired by (#3585) (commit)
- custom-style triggers updateStyles if root scope (StyleDefaults) has style properties when the custom-style is created. (commit)
- Fix _patchMatchesEffect. (#3631) (commit)
- Fixes #3555. Ensure selectors including
::content
without a prefix … (#3721) (commit) - Fixes #3530. When
updateStyles
is called and an element is not attached, invalidate its styling so that when it is attached, its custom properties will be updated. (commit) - Make sure effect functions receive latest values (commit)
- [ci skip] data binding edge case smoke test (commit)
- Use
whenReady
to apply custom styles. (commit) - Use firefox 46 for testing (commit)
- Need to wait until render to test. (commit)
- address feedback (commit)
- Fix lint, use query params instead of duplicate file. (commit)
- Ensure custom styles updated after adding custom-style async. Fixes #3705. (commit)
- Store cacheablility on the scope (commit)
- fix decorateStyles with custom-style (commit)
- Do not scope cache elements with media rules, :host(), or :host-context() selectors (commit)
- Support preventDefault() on touch (#3693) (commit)
- Shim CSS Mixins in terms of CSS Custom Properties (#3587) (commit)
- [ci skip] update changelog (commit)
v1.5.0
New Features
Polymer.Gestures.resetMouseCanceller
: New API for resetting the "mouse cancellor" that prevents mouseevent-driven gestures when using a touch screen. This API is most likely to be useful for testing.
Meaningful Changes
detached
callback now has the same "wait for first paint" semantics as theattached
callback for consistency._log
,_warn
, and_error
logging functions now also accept multiple string arguments. Previously only single array of arguments was supported.
Example:
// pre v1.5.0
this._log(this._logf('clicked the', this.$.red, 'button'));
this._error(['missing argument']);
// v1.5.0+, older form still accepted
this._log('clicked the', this.$.red, 'button');
this._error('missing argument');
Raw Notes
- Fix test in Firefox that was hacked to work in Canary (instead filed https://bugs.chromium.org/p/chromium/issues/detail?id=614198). (commit)
- remove unneeded argument (commit)
- slight optimization, avoid work if no cssText is set. (commit)
- More efficient fix for #3661. Re-uses cached style element that needs to be replaced in the document rather than creating a new one. (commit)
- Fixes #3661: ensure that cached style points to the applied style for Shady DOM styling. This ensures that the cache can be used to determine if a style needs to be applied to the document and prevents extra unnecessary styles from being added. This could happen when a property cascaded to a nested element and updateStyles was called after properties have changed. (commit)
- Fix flakey attached/detached timing test. (commit)
- remove HTML comment (commit)
- add more style[include] doc (commit)
- Update the package.json name to match the actual npm published package. (#3570) (commit)
- Remove unused event cache store (#3591) (commit)
- [ci skip] sudo should be "required" (commit)
- transition to travis trusty images (commit)
- fine, console.dir then (commit)
- fix ie missing console.table for stubbing (commit)
- Support the devtools console.log api (multiple strings) for polymer logging (commit)
- Compute and use correct annotation value during config (commit)
- Set propertyName on parent props for config phase. (commit)
- Refactorings around how computational expressions get their arguments (commit)
- Fix safari 7 again (commit)
- Expose public API to reset mouse cancelling for testing touch (commit)
- Delay detached callback with the same strategy as attached callback (commit)
- [ci skip] Add missing dom5 devDependency (commit)
- Don't use
translate
as a method for testing (commit) - Only fix prototype when registering at first create time. (commit)
- Fixes #3525: Makes lazy registration compatible with platforms (like IE10) on which a custom element's prototype must be simulated. (commit)
- make sure gulp-cli 1 is used (commit)
- Ensure Annotator recognizes dynamic fn as dependency for parent props. (commit)
- [ci skip] Update CHANGELOG (commit)
- Enabling caching of node_modules on Travis (commit)
- Fix undefined class attribute in undefined template scope (commit)
- Use a parser based html minification (commit)
- Call _notifyPath instead of notifyPath in templatizer (commit)
- Keep it real for notifyPath. (commit)
- Null debounced callback to set for GC. (commit)
Stable Release v1.4.0
New Features
- "lazy registration": (enabled via
lazyRegister: true
in Polymer settings) that will cause most of the expensive registration work we do during thePolymer({...})
call to be deferred until the first instantiation of that type.- This is an opt-in feature for now, but as we get more feedback, we will consider making it the default.
Meaningful changes
- Properties starting with an uppercase, like
FPS
, will no longer reflect to attributes.- Prior to v1.3.0, any property like
FPS
would reflect incorrectly to attributefps
. With v1.3.0,FPS
would serialize to-f-p-s
, which is not a valid attribute name to set withsetAttribute
, causing some bindings to throw exceptions. With this change, starting-uppercase properties will not reflect, and will warn to the console that they do not reflect.
- Prior to v1.3.0, any property like
Raw Notes
- Fast check in createdCallback to see if registration has finished. (commit)
- even more lazy: defer template lookup and style collection until finish register time. (commit)
- fix lint errors. (commit)
-
- turn on lazy registration via
Polymer.Settings.lazyRegister
* ensure registration finished by callingElement.prototype.ensureRegisterFinished()
(commit)
- turn on lazy registration via
- remove crufty smoke test. (commit)
- fix lint issues (commit)
- Change
forceRegister
toeagerRegister
and addPolymer.Settings.eagerRegister
flag. (commit) - Add
forceRegister
flag to force an element to fully register whenPolymer
is called. Normally, some work is deferred until the first element instance is created. (commit) - Call registered no prototype. (commit)
- Lazy register features we can be deferred until first instance. This is an optimization which can speed up page load time when elements are registered but not needed at time of first paint/interaction (commit)
- Do not reflect uppercase properties (commit)
- Make sure event.path is an array (commit)
- fix testing failures on assert.notInclude of null (commit)
- [ci skip] update changelog (commit)
Stable Release v1.3.1
Big Changes
- Fixes known issues of v1.3.0
- Using
var()
in a mixin could break the scoped style, if no other custom property was defined in that style dom-bind
could render before the document was finished loading
- Using
Raw Notes
- Fix lint errors. (commit)
- Add test. (commit)
- Fix lint error. (commit)
- Ensure that dom-bind always waits until DOMContentLoaded to render. This ensures a script can install api on the dom-bind prior to it rendering. Previously dom-bind waited for first render, but an early parser yield can make this occur unexpectedly early. (commit)
- Refine fix for #3461 so that the decision to apply a static or property stylesheet relies on the same info. (commit)
- Clean the .eslintignore (commit)
- [ci skip] Add header for those asking questions (commit)
- Fixes #3461: Only avoid creating a statically scoped stylesheet when properties are consumed in an element, properly excluding properties produced as a result of consumption. (commit)
- tweaks to new README (commit)
- [ci skip] Update Changelog (commit)
- Updated the README.md for a non-technical user to understand (commit)
Stable Release v1.3.0
Big Changes
-
[New Feature]
::content
works standalone when styling (used to require something in front, like::host
) -
Attributes bound that are not in the
properties
block will not make a property (previously, a property would be made, but not kept up to date with the attribute changing)- See Kevin's Note: #3383 (comment)
-
[New Feature] Newlines now supported in computed bindings
- Example
<div hidden$="[[_someVeryLongFunctionName( someVeryLongArg, anotherCrazyLongArg)]]">
-
[New Feature] CSS Custom properties now work in
@keyframe
rules -
Polymer is now using ESLint
-
[New Feature] Allow
[attribute ~= "value"]
selectors -
Equalize styling specificity of CSS Custom Properties and
::host
rules -
Deduplicate
behaviors
(prevent weird behaviors when multiple behaviors try to override each other because they are duplicated). -
[New Feature] Bindings of style
{{ foo.bar-baz }}
now work -
CSS Variables with values that contain parens like
url()
now work -
[New Feature] Add support for dynamic functions in bindings
- computedBindings and observers will trigger when a function changes
- computedBindings on functions can be used to lazily trigger bindings on external changes, or encapsulate dependencies
- A good example is a
translate
function for i18n that depends on external translation tables - Example
<i18n-string>[[translate('hi!')]]</i18n-string> <script> Polymer({ is: 'i18n-string', properties: { translate: { type: Function, computed: '_computeTranslateFn(translationService)' }, translationService: { type: Function, value: function(str){ return str; } } }, _computeTranslateFn: function(ts) { return function(str) { return ts(str); } } }); </script>
In this example,
i18n-string
can wait fortranslationService
to be set before attempting translations, will update translations whentranslationService
is changed, and encapsulates the dependency ontranslationService
in the computedtranslate
function, removing it from the binding. -
Setting properties on un-upgraded elements is now supported.
- Properties will be pushed into the data binding system when the element upgrades.
Raw Notes
- [ci skip] Add instructions to pull request template (commit)
- [ci skip] markdown fail (commit)
- [ci skip] Add instructions to issue template (commit)
- Make sure to configure properties on polymer elements that do not have property effects. (commit)
- Fix lint errors. (commit)
- Add comment. Ensure Date deserializes to String for correctness. (commit)
- Serialize before deserialize when configuring attrs. Fixes #3433. (commit)
- Restrict early property set to properties that have accessors. This allows users to set properties in
created
which are listed inproperties
but which have no accessor. (commit) - fix crlf once and for all (commit)
- fix test linting from #3350 (commit)
- Use the new .github folder for issue and pull request templates (commit)
- [ci skip] Use https for jsbin (commit)
- [ci skip] Add issue and pr template (commit)
- Update to gulp-eslint v2 (commit)
- fix lint errors (commit)
- Minor fixes based on review. (commit)
- Undo fix on IE10 where the custom elements polyfill's mixin strategy makes this unfeasible. (commit)
- Update comments. (commit)
- Add test that late resolved functions don't warn (commit)
- Add support for properties defined in a behavior. (commit)
- Generalized approach supporting compute and observers (commit)
- Proper implementation (commit)
- Support dynamic functions for computed annotations. (commit)
- ordering issue for when assert is defined in native html imports (commit)
- Lint the tests (commit)
- Add support for one-of attribute selector while not breaking support for general sibling combinator. Fixes #3023. Fix taken from #3067. (commit)
- Fix bindings with special characters (commit)
- [ci skip] move linting into before_script stage (commit)
- Fix lint error and uncomment test. (commit)
- Add test for overriding property based :host selector from outside. (commit)
- Add comment and fix typo (commit)
- Ensure _propertySetter is installed first. Fixes #3063 (commit)
- Disable tap gesture when track gesture is firing for ancestor node (commit)
- Fix parsing of parenthesis in default of variable declaration (commit)
- Rename _mapRule to _mapRuleOntoParent (commit)
- Test with ESLint enabled (commit)
- Make behaviors array unique (commit)
- Use deserialize from the node. (commit)
- Actually execute case-map (commit)
- [ci skip] .eslintrc is deprecated, add .json suffix (commit)
- Make the test more look like a spec (commit)
- Configure attr's with property effects. More robust fix for #3288. (commit)
- Use ESLint for Polymer (commit)
- Add test suite for effects order (commit)
- Fix negation when a negated binding is changed (commit)
- Add unit test suite for CaseMap (commit)
- Fixes for IE style ordering issue. (commit)
- Fixes #3326. Changes inspired by #3276 and #3344 (commit)
- Fix for getters/setters for property become inaccessible when property set on element before it is ready (commit)
- Non-destructive
@keyframes
rule transformation. (commit) - Fix test regression from PR 3289 (commit)
- Move test and add to runner. (commit)
- make isDebouncerActive actually return a bool (commit)
- Lint the javascript code with eslint (commit)
- i suck at git (commit)
- Fix for scoping when class is not specified on element (null was prepended instead of empty string) (commit)
- Using constant rather than plain
:host
and::content
, also create regexp object only once (commit) - Eliminate the need to write
:host ::content
instead of just::content
, while keeping the same processing under the hood (commit) - Fix: There is no effect of kind 'computedAnnotation' (commit)
- fix test case in 5d17efc (commit)
- add test for 3326 (commit)
- [ci skip] update CHANGELOG (commit)
- Exclude attribute bindings from configuration. Fixes #3288. (commit)
- Doubled
Polymer.CaseMap.dashToCamelCase
performance with simplified and once compiled RegExp. 5 times fasterPolymer.CaseMap.camelToDashCase
using simplified replace part, simplified and once compiled RegExp. (commit) - Update PRIMER.md (commit)
- Unit tests (commit)
- Allow newlines in computed binding argument list ...
Stable Release v1.2.4
- Fixes #3337. When a doc fragment is added, only update the invalidation state of the insertion point list of the shadyRoot IFF it is not already invalid. This fixes an issue that was detected when an a doc fragment that did not include an insertion point was added after one that did but before distribution. (commit)
- fix build output with new vulcanize (commit)
- Revert style properties change from fd57784 (commit)
- Fix shadow dom test. (commit)
- Add shadow root support. (tests broken) (commit)
- Ensure dom-if moved into doc fragment is torn down. Fixes #3324 (commit)
- improve test. (commit)
- Update comment. (commit)
- In addition to fragments, also handle non-distributed elements more completely. (commit)
- Simplify fix for fragment children management. (commit)
- Fix test under polypill. (commit)
- Ensure fragments added via Polymer.dom always have elements removed, even when distribution does not select those elements. (commit)
- Fixes #3321. Only let dom-repeat insert elements in attached if it has been previously detached; correctly avoid re-adding children in document fragments to an element's logical linked list if they are already there. (commit)
- Ugh (commit)
- Fixes #3308. Use an explicit undefined check to test if logical tree information exists. (commit)
- add test (commit)
- use class attribute in applyElementScopeSelector (commit)
- Remove reference to _composedChildren (commit)
- Fix typo in documentation for set() (commit)
- Fix typo in dom-tree-api (commit)
- Correct use of document.contains to document.documentElement.contains on IE. (commit)
- Ensure querySelector always returns
null
when a node is not found. Also optimize querySelector such that the matcher halts on the first result. (commit) - Fixes #3295. Only cache a false-y result for an element's owner shady root iff the element is currently in the document. (commit)
- Use local references to wrapper functions; add test element tree to native shadow tests; reorder test elements. (commit)
- Remove leftover garbage line (commit)
- Removes the case where activeElement could be in the light DOM of a ShadowRoot. (commit)
- DOM API implementation of
activeElement
. (commit) - Remove call to
wrap
in deepContains (commit) - Fixes #3270. (commit)
- Include more styling tests under ShadowDOM. Fix custom-style media query test to work under both shadow/shady. (commit)
- Remove duplicate code related to dom traversal in Polymer.dom. (commit)
- Fix parsing of minimized css output also for mixins (commit)
- Set position to relative to make Safari to succeed top/bottom tests (commit)
- Fix parsing of minimized css output (commit)
- Fix for
Polymer.dom(...)._query()
method doesn't exist which causesPolymer.updateStyles()
to fail (commit) - Minor factoring of dom patching. (commit)
- use destination insertion points when calculating the path (commit)
- Store all dom tree data in
__dom
private storage; implement composed patching via a linked list. (commit) - Modernize the build (commit)
- Add more globals to whitelist for safari (commit)
- Shady patching: patch element accessors in composed tree; fixes HTMLImports polyfill support. (commit)
- remove unused code; minor changes based on review. (commit)
- added polymer-mini and polymer-micro to main (commit)
- Updates the patch-don experiment to work with recent changes. (commit)
- Fixes #3113 (commit)
- Polymer.dom: when adding a node, only remove the node from its existing location if it's not a fragment and has a parent. (commit)
- Consistently use TreeApi.Composed api for composed dom manipulation; use TreeApi.Logical methods to get node leaves. Avoid making a Polymer.dom when TreeApi.Logical can provide the needed info. (commit)
- Produce nicer error on malformed observer (commit)
- Deduplicate setup and verifying in notify-path test suite (commit)
- more explicit tests for debouncer wait and no-wait behavior (commit)
- speed up microtask testing (commit)
- ensure isDebouncerActive returns a Boolean (commit)
- add more debouncer tests (commit)
- remove dead debounce test assertion (commit)
- Factoring of distribution logic in both add and remove cases. (commit)
- Minor typo in docs: call the debounce callback (commit)
- Correct test to avoid using
firstElementChild
on a documentFragment since it is not universally supported. (commit) - Remove all TODOs (commit)
- Revert "Add .gitattributes to solve line endings cross-OS (merge after other PRs)" (commit)
- Make renderedItemCount readOnly & add tests. (commit)
- Revert "Fix parsing of minimized css output" (commit)
- Custom setProperty for bindings to hidden textNodes. Fixes #3157. (commit)
- Ensure dom-if in host does not restamp when host detaches. Fixes #3125. (commit)
- Avoid making a copy of childNodes when a dom fragment is inserted in the logical tree. (commit)
- Slightly faster
findAnnotatedNodes
(commit) - Add .gitattributes to solve line endings cross-OS (commit)
- Ensure literals are excluded from parent props. Fixes #3128. Fixes #3121. (commit)
- Fix parsing of minimized css output (commit)
- Disable chunked dom-repeat tests on IE due to CI rAF flakiness. (commit)
- Add comment. (commit)
- Make Polymer.dom.flush reentrant-safe. Fixes #3115. (commit)
- Fixes #3108. Moves
debounce
functionality from polymer-micro to polymer-mini. The functionality belongs at the mini tier and was never actually functional in micro. (commit) - Clarify this is for IE. (commit)
- Patch rAF to setTimeout to reduce flakiness on CI. (commit)
- added missing semicolons, removed some unused variables (commit)
- ?Node (commit)
- Remove closures holding element references after mouseup/touchend (commit)
- set class attribute instead of using classname (commit)
- Include wildcard character in identifier. Fixes #3084. ([commit](https://github.com/Polymer/...