title: JavaScript initialization before Polymer element registration
body: <p>Moving from <code>Polymer</code> <strong>v0.5</strong> to <strong>v1.0</strong> the registration process of <code>Polymer elements</code> seems to be different. Before <code>Polymer v1.0</code> we could execute JavaScript code from <code>index.html</code> to initialize all needed objects in our <code>Polymer elements</code>. This is a very important detail because the <code>data-binding</code> in <code>Polymer</code> <strong>ONLY</strong> works correct when the bounded objects are initialized <strong>FIRST</strong>. This means the following: </p>
  
  <p>For example if you want to bind an object in your <code>Polymer element</code> with <code>{{ }}</code> or <code>[[ ]]</code>, the object <strong>must</strong> be defined before the <code>Polymer element</code> registration! See:</p>
  
  <pre><code>&lt;dom-module id="my-elem"&gt;
    &lt;template&gt;
      &lt;div&gt;This should be my bounded object: &lt;b&gt;{{obj.name}}&lt;/b&gt;&lt;/div&gt;
    &lt;/template&gt;
    &lt;script&gt;
      Polymer({
      is: 'my-elem',
      ready: function () {
        // Global initialized object!!!
        // app.obj ==&gt; app.obj = { name: 'Great', info: 'Additional info!!!' };
        this.obj = app.obj;
      }
      ...      
    &lt;/script&gt;
  &lt;/dom-module&gt;
  </code></pre>
  
  <p>The problem is that if the <code>Polymer element</code> is registered <strong>BEFORE</strong> <code>app.obj</code> is initialized (in the example above <code>this.obj</code> is <code>undefined</code> at the time of <code>Polymer element</code> registration) then <strong>NO</strong> notification will be executed and no update provided even when <code>app.obj</code> is <strong>NOT</strong> <code>undefined</code> later on.</p>
  
  <p>So in cases like that we need to initialize all bounded object first before we can use them with <code>{{ }}</code> or <code>[[ ]]</code>.</p>
  
  <p>Is our approach totally wrong??? Any suggestions???</p>