File tree 4 files changed +18
-6
lines changed
4 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 130
130
this . _notes = this . _template . _content . _notes ;
131
131
} else {
132
132
this . _notes = Polymer . Annotations . parseAnnotations ( this . _template ) ;
133
+ this . _processAnnotations ( this . _notes ) ;
133
134
}
134
- this . _processAnnotations ( this . _notes ) ;
135
135
Polymer . Annotations . prepElement = null ;
136
136
}
137
137
} ,
188
188
if ( p . signature ) {
189
189
var args = p . signature . args ;
190
190
for ( var kk = 0 ; kk < args . length ; kk ++ ) {
191
- pp [ args [ kk ] . model ] = true ;
191
+ var model = args [ kk ] . model ;
192
+ if ( model ) {
193
+ pp [ model ] = true ;
194
+ }
192
195
}
193
196
} else {
194
- pp [ p . model ] = true ;
197
+ if ( p . model ) {
198
+ pp [ p . model ] = true ;
199
+ }
195
200
}
196
201
}
197
202
}
Original file line number Diff line number Diff line change 222
222
;
223
223
// basic argument descriptor
224
224
var a = {
225
- name : arg ,
226
- model : this . _modelForPath ( arg )
225
+ name : arg
227
226
} ;
228
227
// detect literal value (must be String or Number)
229
228
var fc = arg [ 0 ] ;
246
245
}
247
246
// if not literal, look for structured path
248
247
if ( ! a . literal ) {
248
+ a . model = this . _modelForPath ( arg ) ;
249
249
// detect structured path (has dots)
250
250
a . structured = arg . indexOf ( '.' ) > 0 ;
251
251
if ( a . structured ) {
Original file line number Diff line number Diff line change 11
11
obj ="{{obj}} "
12
12
obj-prop ="{{obj.prop}} "
13
13
conflict ="{{outerInnerConflict.prop}} "
14
+ computed-from-literal ="{{computeFromLiteral(33, prop)}} "
14
15
> </ x-child >
15
16
</ template >
16
17
</ x-templatizer >
238
239
] ,
239
240
outerObjChanged : function ( ) { } ,
240
241
objAChanged : function ( ) { } ,
241
- objBChanged : function ( ) { }
242
+ objBChanged : function ( ) { } ,
243
+ computeFromLiteral : function ( ) { }
242
244
} ) ;
243
245
244
246
</ script >
Original file line number Diff line number Diff line change 250
250
assert . equal ( childA . conflict , 'bar' ) ;
251
251
} ) ;
252
252
253
+ test ( 'ensure literals are not forwarded to templates' , function ( ) {
254
+ assert . notOk ( host . _propertyEffects [ 33 ] ) ;
255
+ assert . notOk ( Object . getOwnPropertyDescriptor ( Object . getPrototypeOf ( host ) , 33 ) ) ;
256
+ } ) ;
257
+
253
258
} ) ;
254
259
255
260
</ script >
You can’t perform that action at this time.
0 commit comments