mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Replace _compoundInitializationEffect with statically-initialized literals in the template for attributes & textContent, and by configuring literal values of properties in _configureAnnotationReferences.
This commit is contained in:
@@ -24,13 +24,15 @@
|
||||
computed-from-tricky-literals2='{{computeFromTrickyLiterals(3,"tricky\,'zot'" )}}'
|
||||
computed-from-no-args="{{computeFromNoArgs( )}}"
|
||||
no-computed="{{foobared(noInlineComputed)}}"
|
||||
compound1="{{cpnd1}}{{ cpnd2 }}{{cpnd3.prop}}{{ computeCompound(cpnd4, cpnd5, 'literal')}}"
|
||||
compound2="literal1 {{cpnd1}} literal2 {{cpnd2}}{{cpnd3.prop}} literal3 {{computeCompound(cpnd4, cpnd5, 'literal')}} literal4"
|
||||
compoundAttr1$="{{cpnd1}}{{ cpnd2 }}{{cpnd3.prop}}{{ computeCompound(cpnd4, cpnd5, 'literal')}}"
|
||||
compoundAttr2$="literal1 {{cpnd1}} literal2 {{cpnd2}}{{cpnd3.prop}} literal3 {{computeCompound(cpnd4, cpnd5, 'literal')}} literal4"
|
||||
>
|
||||
Test
|
||||
</div>
|
||||
<x-prop id="boundProps"
|
||||
prop1="{{cpnd1}}{{ cpnd2 }}{{cpnd3.prop}}{{ computeCompound(cpnd4, cpnd5, 'literal')}}"
|
||||
prop2="literal1 {{cpnd1}} literal2 {{cpnd2}}{{cpnd3.prop}} literal3 {{computeCompound(cpnd4, cpnd5, 'literal')}} literal4"
|
||||
></x-prop>
|
||||
<span id="boundText">{{text}}</span>
|
||||
<span idtest id="{{boundId}}"></span>
|
||||
<s id="computedContent">{{computeFromTrickyLiterals(3, 'tricky\,\'zot\'')}}</s>
|
||||
@@ -364,6 +366,26 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'x-prop',
|
||||
properties: {
|
||||
prop1: {
|
||||
value: 'default',
|
||||
observer: 'prop1Changed'
|
||||
},
|
||||
prop2: {
|
||||
value: 'default',
|
||||
observer: 'prop2Changed'
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
this.prop1Changed = sinon.spy();
|
||||
this.prop2Changed = sinon.spy();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'x-notifies1',
|
||||
|
||||
Reference in New Issue
Block a user