File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 595595
596596< dom-module id ="x-bind-computed-property ">
597597 < template >
598- < div id ="check "> [[translate ('Hello World.')]]</ div >
598+ < div id ="check "> [[translateMessage ('Hello World.')]]</ div >
599599 </ template >
600600 < script >
601601 ( function ( ) {
602602 var TranslateBehavior = {
603603 properties : {
604- translate : {
604+ translateMessage : {
605605 type : Function ,
606606 computed : '_computeTranslateFn(translator)'
607607 }
634634
635635< dom-module id ="x-bind-computed-property-late-translator ">
636636 < template >
637- < div id ="check "> [[translate (message)]]</ div >
637+ < div id ="check "> [[translateMessage (message)]]</ div >
638638 </ template >
639639 < script >
640640 Polymer ( {
644644 type : String ,
645645 value : 'Hello'
646646 } ,
647- translate : {
647+ translateMessage : {
648648 type : Function ,
649649 computed : '_computeTranslateFn(translator)'
650650 } ,
Original file line number Diff line number Diff line change 296296
297297 var el ;
298298
299- setup ( function ( ) {
300-
301- } ) ;
302-
303299 teardown ( function ( ) {
304300 document . body . removeChild ( el ) ;
305301 } ) ;
334330 Polymer ( {
335331 is : 'x-observer-with-dynamic-function' ,
336332 properties : {
337- translate : {
333+ translateMessage : {
338334 type : Function
339335 } ,
340336 message : {
343339 }
344340 } ,
345341
346- observers : [ 'translate (message)' ]
342+ observers : [ 'translateMessage (message)' ]
347343
348344 } ) ;
349345
350346 el = document . createElement ( 'x-observer-with-dynamic-function' ) ;
351347 document . body . appendChild ( el ) ;
352348
353349 var called = 0 ;
354- el . translate = function ( ) {
350+ el . translateMessage = function ( ) {
355351 called += 1 ;
356352 } ;
357353
364360 is : 'x-computed-property-with-dynamic-function' ,
365361 properties : {
366362 computedValue : {
367- computed : "translate ('Hello')"
363+ computed : "translateMessage ('Hello')"
368364 } ,
369- translate : {
365+ translateMessage : {
370366 type : Function
371367 }
372368 }
378374 assert . equal ( el . computedValue , undefined ) ;
379375
380376 var called = 0 ;
381- el . translate = function ( message ) {
377+ el . translateMessage = function ( message ) {
382378 called += 1 ;
383379 return 'translated: ' + message ;
384380 } ;
You can’t perform that action at this time.
0 commit comments