Skip to content

Commit

Permalink
Fixes #3270.
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Orvell committed Jan 5, 2016
1 parent 7c20170 commit 7d0485b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/lib/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

createdCallback: function() {
Polymer.telemetry.instanceCount++;
this.isAttached = false;
this.root = this;
this._doBehavior('created'); // abstract
this._initFeatures(); // abstract
Expand Down
20 changes: 20 additions & 0 deletions test/unit/bind-elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,23 @@
<input id="input" value$="{{inputValue}}">
</template>
</dom-module>


<dom-module id="x-bind-is-attached">
<template>
<div id="check">{{isAttached}}</div>
</template>
<script>
Polymer({
is: 'x-bind-is-attached',
properties: {
isAttached: {
observer: '_isAttachedChanged'
}
},
_isAttachedChanged: function() {}
});
</script>
</dom-module>

<s
9 changes: 9 additions & 0 deletions test/unit/bind.html
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,15 @@
assert.equal(el.$.binding.textContent, 'binding');
});

test('bind to isAttached', function() {
var el = document.createElement('x-bind-is-attached');
sinon.spy(el, '_isAttachedChanged');
document.body.appendChild(el);
Polymer.dom.flush();
assert.equal(el.$.check.textContent, 'true');
assert.isTrue(el._isAttachedChanged.calledOnce);
document.body.removeChild(el);
});
});

suite('compound binding / string interpolation', function() {
Expand Down

0 comments on commit 7d0485b

Please sign in to comment.