Function in element vs function in file outside

14 views
Skip to first unread message

toduu

unread,
Oct 17, 2015, 12:37:38 AM10/17/15
to Polymer
I have a index file with iron pages and one of the pages has an iron list with my self made element.

The self made element has a javascript function attached to an event.  I have two options -  (a) include the function in the index file or another external js file and call it in the element or (b) have the function as part of my element script.

Which option is more optimal given the element is in a list that will be paginated through many times.  I suspect in option b I have the same thing repeated many times and option a I have to concern my self with global variables. 

Any pointers are appreciated.
Reply all
Reply to author
Forward
0 new messages