mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Exclude attribute bindings from configuration. Fixes #3288.
This commit is contained in:
@@ -136,7 +136,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
for (var i=0, l=fx.length, x; (i<l) && (x=fx[i]); i++) {
|
||||
// TODO(kschaaf): compound bindings (as well as computed effects)
|
||||
// are excluded from top-down configure for now; to be revisited
|
||||
if (x.kind === 'annotation' && !x.isCompound) {
|
||||
if (x.kind === 'annotation' &&
|
||||
x.effect.kind !== 'attribute' &&
|
||||
!x.isCompound) {
|
||||
var node = this._nodes[x.effect.index];
|
||||
// seeding configuration only
|
||||
if (node._configValue) {
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
<dom-module id="x-configure-host">
|
||||
<template>
|
||||
<x-configure-child id="child" content="{{content}}" object="{{object.goo}}"></x-configure-child>
|
||||
<x-configure-child id="child" content="{{content}}" object="{{object.goo}}" attr$="{{attrValue}}"></x-configure-child>
|
||||
</template>
|
||||
<script>
|
||||
Polymer({
|
||||
@@ -156,6 +156,9 @@
|
||||
},
|
||||
stomp: {
|
||||
value: 5
|
||||
},
|
||||
attrValue: {
|
||||
value: 'attrValue'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
|
||||
<x-configure-value content="attr" object='{"foo": "obj-attr"}'></x-configure-value>
|
||||
|
||||
<x-configure-host></x-configure-host>
|
||||
<x-configure-host></x-configure-host>
|
||||
|
||||
<x-configure-host content="attr"></x-configure-host>
|
||||
<x-configure-host content="attr"></x-configure-host>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -53,7 +53,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
|
||||
test('value set in properties initializes correctly', function() {
|
||||
var e = document.querySelector('x-configure-value');
|
||||
testConfigure(e, 'default', 'obj-default');
|
||||
testConfigure(e, 'default', 'obj-default');
|
||||
});
|
||||
|
||||
test('attribute overrides value set in properties', function() {
|
||||
@@ -81,6 +81,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
assert.equal(e.readOnly, 'default');
|
||||
});
|
||||
|
||||
test('properties for attribute bindings not configured', function() {
|
||||
var e = document.querySelector('x-configure-host');
|
||||
assert.equal(e.$.child.getAttribute('attr'), 'attrValue');
|
||||
assert.equal(e.$.child.attr, undefined);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user