doing some step by step debug continue, I found the code that calls the 
"ready" routine 
  The statement is "this.ready". 

   Then I noticed that the prototype for the function object does not 
include the shadowRoot, nor the "this" from the call.
   That told me a lot. 
   Then I did some step-by-step in one of the listener routines.   It also 
received the "this" from the function proto-type definition.

   Therefore, I decided to pass the "this" parameter as part of all 
functions which I call as sub-functions from one of the polymer callback
   routines.
 
   And just before I add a listener to an object in the "ready" routine I 
attach a reference to the ready routines "this". That way
   when the listener receives control it will have address to the elements 
global values.  

   I guess another "more elegant" way to do this is to extend the 
"function" definition into a "polyFunction" and add the 
   reference to the document fragment to the extended function's prototype 
so it can be reference without having to pass it as a formal argument. 
   But implementing that is too complicated for me. So I will stick to the 
dumb way of doing it.

   You really don't want all of those internal functions on the global 
options list. It reveals too much of the internal structure of the object.
   Because as I understand it,  if a function is on the global options list 
then a script program can call those functions from
   a reference to the object (i.e. getElementById). 

   

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/4f997a91-960b-4526-90a9-980b31ba3eda%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to