Skip to content

Commit

Permalink
Merge branch 'master' into closure-mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Apr 17, 2017
2 parents 36603bc + ad224e4 commit 70a5464
Show file tree
Hide file tree
Showing 55 changed files with 3,363 additions and 1,275 deletions.
16 changes: 15 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@
"rules": {
"no-console": "off",
"no-var": "error",
"strict": "error"
"strict": "error",
"valid-jsdoc": ["error", {
"requireReturn": false,
"prefer": {
"arg": "param",
"argument": "param",
"returns": "return"
},
"preferType": {
"Boolean": "boolean",
"Number": "number",
"String": "string",
"object": "Object"
}
}]
},
"env": {
"browser": true,
Expand Down
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ addons:
sources:
- google-chrome
packages:
- google-chrome-stable
- google-chrome-beta
cache:
directories:
- node_modules
before_script:
- mkdir -p ~/bin
- ln -s /usr/bin/google-chrome-beta ~/bin/google-chrome
- export PATH=$HOME/bin:$PATH
- npm install -g bower gulp-cli@1
- bower install
- gulp lint
Expand Down
48 changes: 24 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Change Log

##[v1.8.1-dev](https://github.com/Polymer/polymer/tree/v1.8.1-dev) (2017-02-27)
## [v1.8.1-dev](https://github.com/Polymer/polymer/tree/v1.8.1-dev) (2017-02-27)
- Exclude SD polyfill tests for Edge due to lack of workarounds for Edge DocFrag bugs. ([commit](https://github.com/Polymer/polymer/commit/de45ba02))

- [ci skip] Update comment to include reference to problem browser. ([commit](https://github.com/Polymer/polymer/commit/72f21fe6))
Expand All @@ -23,7 +23,7 @@

- [ci skip] Update Changelog ([commit](https://github.com/Polymer/polymer/commit/2d804a28))

##[v1.8.0-dev](https://github.com/Polymer/polymer/tree/v1.8.0-dev) (2017-02-06)
## [v1.8.0-dev](https://github.com/Polymer/polymer/tree/v1.8.0-dev) (2017-02-06)
- Add comment. ([commit](https://github.com/Polymer/polymer/commit/a42cb209))

- Only keep `disable-upgrade` attribute if it is an attribute binding. ([commit](https://github.com/Polymer/polymer/commit/62e9b84b))
Expand Down Expand Up @@ -76,7 +76,7 @@

- Close backtick in ISSUE_TEMPLATE.md ([commit](https://github.com/Polymer/polymer/commit/b0dea8bc))

##[v1.7.1-dev](https://github.com/Polymer/polymer/tree/v1.7.1-dev) (2016-12-14)
## [v1.7.1-dev](https://github.com/Polymer/polymer/tree/v1.7.1-dev) (2016-12-14)
- Remove dependency on WebComponets for IE detection ([commit](https://github.com/Polymer/polymer/commit/650c16a9))

- Make sure text nodes are distributed when translating slot to content ([commit](https://github.com/Polymer/polymer/commit/87e312f1))
Expand Down Expand Up @@ -121,7 +121,7 @@

- Fix copy&pasted comment ([commit](https://github.com/Polymer/polymer/commit/d595c0cc))

##[v1.7.0](https://github.com/Polymer/polymer/tree/v1.7.0) (2016-09-28)
## [v1.7.0](https://github.com/Polymer/polymer/tree/v1.7.0) (2016-09-28)
- Fix IE style cache performance ([commit](https://github.com/Polymer/polymer/commit/d08b694))

- no need for :root to be first in the selector ([commit](https://github.com/Polymer/polymer/commit/63433c8))
Expand Down Expand Up @@ -198,7 +198,7 @@

- Revert "Fix _patchMatchesEffect. (#3631)" ([commit](https://github.com/Polymer/polymer/commit/a64f227))

##[v1.6.1](https://github.com/Polymer/polymer/tree/v1.6.1) (2016-08-01)
## [v1.6.1](https://github.com/Polymer/polymer/tree/v1.6.1) (2016-08-01)
- Property Shim needs to handle build output from apply shim ([commit](https://github.com/Polymer/polymer/commit/d726a51))

- Do not resolve urls with leading slash and other prototcols ([commit](https://github.com/Polymer/polymer/commit/94f95ec))
Expand Down Expand Up @@ -285,7 +285,7 @@

- Ensure fromAbove in _forwardParentProp. ([commit](https://github.com/Polymer/polymer/commit/072dcff))

##[v1.6.0](https://github.com/Polymer/polymer/tree/v1.6.0) (2016-06-29)
## [v1.6.0](https://github.com/Polymer/polymer/tree/v1.6.0) (2016-06-29)
- Fix test to account for pseudo element differences x-browser. ([commit](https://github.com/Polymer/polymer/commit/54a462d))

- Restore functionality of selectors like `:host(.foo)::after`. ([commit](https://github.com/Polymer/polymer/commit/ff88e17))
Expand Down Expand Up @@ -350,7 +350,7 @@

- [ci skip] update changelog ([commit](https://github.com/Polymer/polymer/commit/adef722))

##[v1.5.0](https://github.com/Polymer/polymer/tree/v1.5.0) (2016-05-31)
## [v1.5.0](https://github.com/Polymer/polymer/tree/v1.5.0) (2016-05-31)
- Fix test in Firefox that was hacked to work in Canary (instead filed https://bugs.chromium.org/p/chromium/issues/detail?id=614198). ([commit](https://github.com/Polymer/polymer/commit/1e2aed5))

- remove unneeded argument ([commit](https://github.com/Polymer/polymer/commit/4a99b83))
Expand Down Expand Up @@ -419,7 +419,7 @@

- Null debounced callback to set for GC. ([commit](https://github.com/Polymer/polymer/commit/f366c1c))

##[v1.4.0](https://github.com/Polymer/polymer/tree/v1.4.0) (2016-03-18)
## [v1.4.0](https://github.com/Polymer/polymer/tree/v1.4.0) (2016-03-18)
- Fast check in createdCallback to see if registration has finished. ([commit](https://github.com/Polymer/polymer/commit/a3fce19))

- even more lazy: defer template lookup and style collection until finish register time. ([commit](https://github.com/Polymer/polymer/commit/103f790))
Expand Down Expand Up @@ -448,7 +448,7 @@

- [ci skip] update changelog ([commit](https://github.com/Polymer/polymer/commit/58e6713))

##[v1.3.1](https://github.com/Polymer/polymer/tree/v1.3.1) (2016-03-02)
## [v1.3.1](https://github.com/Polymer/polymer/tree/v1.3.1) (2016-03-02)
- Fix lint errors. ([commit](https://github.com/Polymer/polymer/commit/44d06f1))

- Add test. ([commit](https://github.com/Polymer/polymer/commit/02660c1))
Expand All @@ -471,7 +471,7 @@

- Updated the README.md for a non-technical user to understand ([commit](https://github.com/Polymer/polymer/commit/0729cef))

##[v1.3.0](https://github.com/Polymer/polymer/tree/v1.3.0) (2016-02-22)
## [v1.3.0](https://github.com/Polymer/polymer/tree/v1.3.0) (2016-02-22)
- [ci skip] Add instructions to pull request template ([commit](https://github.com/Polymer/polymer/commit/933c920))

- [ci skip] markdown fail ([commit](https://github.com/Polymer/polymer/commit/a8e01e2))
Expand Down Expand Up @@ -610,7 +610,7 @@

- parentProps should not override argument based props ([commit](https://github.com/Polymer/polymer/commit/898fe89))

##[v1.2.4](https://github.com/Polymer/polymer/tree/v1.2.4) (2016-01-27)
## [v1.2.4](https://github.com/Polymer/polymer/tree/v1.2.4) (2016-01-27)
- 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](https://github.com/Polymer/polymer/commit/d26b003))

- fix build output with new vulcanize ([commit](https://github.com/Polymer/polymer/commit/c317711))
Expand Down Expand Up @@ -817,7 +817,7 @@

- added missing semicolons, removed some unused variables ([commit](https://github.com/Polymer/polymer/commit/338574d))

##[v1.2.3](https://github.com/Polymer/polymer/tree/v1.2.3) (2015-11-16)
## [v1.2.3](https://github.com/Polymer/polymer/tree/v1.2.3) (2015-11-16)
- Call decorate instead of bootstrap for template prepping ([commit](https://github.com/Polymer/polymer/commit/e2a2cfd))

- Fix global leak test. Necessary due to changes to test harness. ([commit](https://github.com/Polymer/polymer/commit/134766f))
Expand All @@ -836,7 +836,7 @@

- Fix Formatting ([commit](https://github.com/Polymer/polymer/commit/724e1bc))

##[v1.2.2](https://github.com/Polymer/polymer/tree/v1.2.2) (2015-11-12)
## [v1.2.2](https://github.com/Polymer/polymer/tree/v1.2.2) (2015-11-12)
- use local reference for wrap. ([commit](https://github.com/Polymer/polymer/commit/b15e5b9))

- Add Polymer.DomApi.wrap ([commit](https://github.com/Polymer/polymer/commit/6cf974a))
Expand Down Expand Up @@ -983,7 +983,7 @@

- Add test for parsing multi-line css comments ([commit](https://github.com/Polymer/polymer/commit/6f21ae6))

##[v1.2.1](https://github.com/Polymer/polymer/tree/v1.2.1) (2015-10-29)
## [v1.2.1](https://github.com/Polymer/polymer/tree/v1.2.1) (2015-10-29)
- Fix test for SD polyfill ([commit](https://github.com/Polymer/polymer/commit/dd8b3e9))

- Add pre-condition check for completeness. ([commit](https://github.com/Polymer/polymer/commit/89304dc))
Expand All @@ -1000,7 +1000,7 @@

- Fix for mixins declaration with space before colon. Allow any space character or even `{` and `}` (before and after capturing pattern correspondingly) as pattern boundaries instead of new lines only. In minified sources there might be no space, semicolon or line start, so we need to account that as well. ([commit](https://github.com/Polymer/polymer/commit/883aa5c))

##[v1.2.0](https://github.com/Polymer/polymer/tree/v1.2.0) (2015-10-22)
## [v1.2.0](https://github.com/Polymer/polymer/tree/v1.2.0) (2015-10-22)
- A simpler travis config ([commit](https://github.com/Polymer/polymer/commit/3338b67))

- Fix #2587: When Polymer.dom(el).appendChild(node) is called, cleanup work must be performed on the existing parent of node. This change fixes a missing case in this cleanup work: if the existing parent has a observer via `Polymer.dom(parent).observeNodes`, it needs to be notified that node is being removed even if the node does not have specific logical info. For example, if an observed node has no Shady DOM and has a child that is removed. A test for this case was added. ([commit](https://github.com/Polymer/polymer/commit/0d4f418))
Expand Down Expand Up @@ -1089,7 +1089,7 @@

- Adds `getEffectiveChildNodes`, `getEffectiveChildren`, `getEffectiveTextContent` ([commit](https://github.com/Polymer/polymer/commit/f34fb45))

##[v1.1.5](https://github.com/Polymer/polymer/tree/v1.1.5) (2015-10-08)
## [v1.1.5](https://github.com/Polymer/polymer/tree/v1.1.5) (2015-10-08)
- Simplify ([commit](https://github.com/Polymer/polymer/commit/79dfe1f))

- Clean up templatizer _pathEffectorImpl. ([commit](https://github.com/Polymer/polymer/commit/1a89bcf))
Expand Down Expand Up @@ -1126,7 +1126,7 @@

- update CHANGELOG to 1.1.4 ([commit](https://github.com/Polymer/polymer/commit/c2b7c31))

##[v1.1.4](https://github.com/Polymer/polymer/tree/v1.1.4) (2015-09-25)
## [v1.1.4](https://github.com/Polymer/polymer/tree/v1.1.4) (2015-09-25)
- :memo: Update description ([commit](https://github.com/Polymer/polymer/commit/6afb8be))

- :art: Use npm command bin lookup ([commit](https://github.com/Polymer/polymer/commit/84258d4))
Expand Down Expand Up @@ -1155,7 +1155,7 @@

- Fix typos in PRIMER.md ([commit](https://github.com/Polymer/polymer/commit/cf793f4))

##[v1.1.3](https://github.com/Polymer/polymer/tree/v1.1.3) (2015-09-04)
## [v1.1.3](https://github.com/Polymer/polymer/tree/v1.1.3) (2015-09-04)
- Fixes #2403 ([commit](https://github.com/Polymer/polymer/commit/a6694b7))

- Only try to decrement gesture dependency counter if dependency exists ([commit](https://github.com/Polymer/polymer/commit/8886e8c))
Expand All @@ -1164,7 +1164,7 @@

- prepare v1.1.2 ([commit](https://github.com/Polymer/polymer/commit/e78be4f))

##[v1.1.2](https://github.com/Polymer/polymer/tree/v1.1.2) (2015-08-28)
## [v1.1.2](https://github.com/Polymer/polymer/tree/v1.1.2) (2015-08-28)
- Improve composed parent tracking. ([commit](https://github.com/Polymer/polymer/commit/4d15789))

- move the mixing-in of behaviors so that it happens before `register` behaviors are invoked ([commit](https://github.com/Polymer/polymer/commit/637367c))
Expand Down Expand Up @@ -1199,7 +1199,7 @@

- Update changelog with v1.1.1 release ([commit](https://github.com/Polymer/polymer/commit/12fa867))

##[v1.1.1](https://github.com/Polymer/polymer/tree/v1.1.1) (2015-08-20)
## [v1.1.1](https://github.com/Polymer/polymer/tree/v1.1.1) (2015-08-20)
- Fixes #2263: ensure custom-style can parse variable definitions in supported selectors (e.g. /deep/) without exception due to unknown css. ([commit](https://github.com/Polymer/polymer/commit/894492b))

- Fixes #2311, #2323: when elements are removed from their previous position when they are added elsewhere, make sure to remove them from composed, not logical parent. ([commit](https://github.com/Polymer/polymer/commit/3d93116))
Expand All @@ -1226,7 +1226,7 @@

- Support for negative numbers in computed bindings ([commit](https://github.com/Polymer/polymer/commit/fc53f50))

##[v1.1.0](https://github.com/Polymer/polymer/tree/v1.1.0) (2015-08-13)
## [v1.1.0](https://github.com/Polymer/polymer/tree/v1.1.0) (2015-08-13)
- Add comment. ([commit](https://github.com/Polymer/polymer/commit/337b54a))

- Add tests for key splice fix. ([commit](https://github.com/Polymer/polymer/commit/4bc055b))
Expand Down Expand Up @@ -1257,7 +1257,7 @@

- don-module no longer needs to eagerly upgrade custom elements since the web components polyfills do this automatically. ([commit](https://github.com/Polymer/polymer/commit/051e1bf))

##[v1.0.9](https://github.com/Polymer/polymer/tree/v1.0.9) (2015-08-07)
## [v1.0.9](https://github.com/Polymer/polymer/tree/v1.0.9) (2015-08-07)
- Remove undocumented return value. ([commit](https://github.com/Polymer/polymer/commit/1764d0c))

- Add default, update docs. ([commit](https://github.com/Polymer/polymer/commit/ca267a5))
Expand Down Expand Up @@ -1340,7 +1340,7 @@

- Fix #2107: improve binding expression parser to match valid javascript property names. ([commit](https://github.com/Polymer/polymer/commit/7560130))

##[v1.0.8](https://github.com/Polymer/polymer/tree/v1.0.8) (2015-07-23)
## [v1.0.8](https://github.com/Polymer/polymer/tree/v1.0.8) (2015-07-23)
- Disable tracking if scrolling ([commit](https://github.com/Polymer/polymer/commit/ee5177d))

- Fixes #2125: adds a register method to dom-module to support imperative creation. ([commit](https://github.com/Polymer/polymer/commit/861f4aa))
Expand Down Expand Up @@ -1383,7 +1383,7 @@

- Update index.html ([commit](https://github.com/Polymer/polymer/commit/119df98))

##[v1.0.7](https://github.com/Polymer/polymer/tree/v1.0.7) (2015-07-16)
## [v1.0.7](https://github.com/Polymer/polymer/tree/v1.0.7) (2015-07-16)
- Replace placeholders backwards to simplify. ([commit](https://github.com/Polymer/polymer/commit/5eda235))

- Remove unnecessary keys bookkeeping. ([commit](https://github.com/Polymer/polymer/commit/3e02bfd))
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,7 @@ Note that `Polymer.Element` provides a cleaner base class void of a lot of sugar

See below for a visual guide on migrating Polymer 1.0's declarative syntax to the ES6 class syntax in Polymer 2.0:

<a href="">
![image](img/migration.png)
</a>
![Difference in Polymer 1.0 and Polymer 2.0 element definition](img/migration.png)

## Polyfills

Expand Down Expand Up @@ -488,7 +486,7 @@ configure the module name. The only supported declarative way set the module
id is to use `id`.
* <a name="breaking-getPropertyInfo"></a>`element.getPropertyInfo`: This api returned unexpected information some of the time and was rarely used.
* <a name="breaking-getNativePrototype"></a>`element.getNativePrototype`: Removed because it is no longer needed for internal code and was unused by users.
* <a name="breaking-beforeRegister"></a>`element.beforeRegister`: This was originally added for metadata compatibility with ES6 classes. We now prefer users create ES6 classes by extending `Polymer.Element`, specifying metadata in the static `config` property. For legacy use via `Polymer({...})`, dynamic effects may now be added using the `registered` lifecycle method.
* <a name="breaking-beforeRegister"></a>`element.beforeRegister`: This was originally added for metadata compatibility with ES6 classes. We now prefer users create ES6 classes by extending `Polymer.Element`, specifying metadata in the static `properties`, `observers`, and `is` properties. For legacy use via `Polymer({...})`, dynamic effects may still be added by using `beforeRegister` but it is now equivalent to the `registered` lifecycle method. An element's `is` property cannot be set in `beforeRegister` as it could in Polymer 1.x.
* <a name="breaking-attributeFollows"></a>`element.attributeFollows`: Removed due to disuse.
* <a name="breaking-classFollows"></a>`element.classFollows`: Removed due to disuse.
* <a name="breaking-copyOwnProperty"></a>`element.copyOwnProperty`: Removed due to disuse.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polymer",
"version": "2.0.0-rc.3",
"version": "2.0.0-rc.5",
"main": [
"polymer.html"
],
Expand Down
7 changes: 0 additions & 7 deletions lib/elements/array-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@
/**
* Clears the selection state.
*
* @method clearSelection
*/
clearSelection() {
// Unbind previous selection
Expand All @@ -220,7 +219,6 @@
/**
* Returns whether the item is currently selected.
*
* @method isSelected
* @param {*} item Item from `items` array to test
* @return {boolean} Whether the item is selected
*/
Expand All @@ -231,7 +229,6 @@
/**
* Returns whether the item is currently selected.
*
* @method isSelected
* @param {*} idx Index from `items` array to test
* @return {boolean} Whether the item is selected
*/
Expand Down Expand Up @@ -261,7 +258,6 @@
/**
* Deselects the given item if it is already selected.
*
* @method deselect
* @param {*} item Item from `items` array to deselect
*/
deselect(item) {
Expand All @@ -284,7 +280,6 @@
/**
* Deselects the given index if it is already selected.
*
* @method deselect
* @param {number} idx Index from `items` array to deselect
*/
deselectIndex(idx) {
Expand All @@ -295,7 +290,6 @@
* Selects the given item. When `toggle` is true, this will automatically
* deselect the item if already selected.
*
* @method select
* @param {*} item Item from `items` array to select
*/
select(item) {
Expand All @@ -306,7 +300,6 @@
* Selects the given index. When `toggle` is true, this will automatically
* deselect the item if already selected.
*
* @method select
* @param {number} idx Index from `items` array to select
*/
selectIndex(idx) {
Expand Down
10 changes: 8 additions & 2 deletions lib/elements/dom-bind.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

<link rel="import" href="../utils/boot.html">
<link rel="import" href="../mixins/property-effects.html">
<link rel="import" href="../mixins/mutable-data.html">
<link rel="import" href="../mixins/gesture-event-listeners.html">

<script>

Expand All @@ -20,9 +22,13 @@
* @constructor
* @implements {Polymer_PropertyEffects}
* @implements {Polymer_OptionalMutableData}
* @implements {Polymer_GestureEventListener}
* @extends {HTMLElement}
*/
const domBindBase = Polymer.OptionalMutableData(Polymer.PropertyEffects(HTMLElement));
const domBindBase =
Polymer.GestureEventListeners(
Polymer.OptionalMutableData(
Polymer.PropertyEffects(HTMLElement)));

/**
* Custom element to allow using Polymer's template features (data binding,
Expand Down Expand Up @@ -91,8 +97,8 @@
observer.observe(this, {childList: true});
return;
}
this._bindTemplate(template);
this.root = this._stampTemplate(template);
this.$ = this.root.$;
this.__children = [];
for (let n=this.root.firstChild; n; n=n.nextSibling) {
this.__children[this.__children.length] = n;
Expand Down
14 changes: 6 additions & 8 deletions lib/elements/dom-module.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@
static get observedAttributes() { return ['id'] }

/**
* Retrieves the dom specified by `selector` in the module specified by
* `id`. For example, this.import('foo', 'img');
* @method register
* @param {string} id
* @param {string=} selector
* @return {Element} Returns the dom which matches `selector` in the module
* at the specified `id`.
* Retrieves the element specified by the css `selector` in the module
* registered by `id`. For example, this.import('foo', 'img');
* @param {string} id The id of the dom-module in which to search.
* @param {string=} selector The css selector by which to find the element.
* @return {Element} Returns the element which matches `selector` in the
* module registered at the specified `id`.
*/
static import(id, selector) {
if (id) {
Expand Down Expand Up @@ -108,7 +107,6 @@
* Registers the dom-module at a given id. This method should only be called
* when a dom-module is imperatively created. For
* example, `document.createElement('dom-module').register('foo')`.
* @method register
* @param {string=} id The id at which to register the dom-module.
*/
register(id) {
Expand Down
Loading

0 comments on commit 70a5464

Please sign in to comment.