title: How to pass required attributes to element constructor
body: <p>i have a polymer custom element like this</p>
  
  <pre><code>&lt;script src="http://www.polymer-project.org/platform.js"&gt;&lt;/script&gt;
  &lt;script src="http://www.polymer-project.org/polymer.js"&gt;&lt;/script&gt;
  
  &lt;polymer-element name="my-foo" constructor="MyFoo" attributes="controller" noscript&gt;
      &lt;template&gt;
        hello from {{options.name}}
      &lt;/template&gt;
      &lt;script&gt;
        Polymer({
          get options() {
            return this.controller.options;
          }
        });
      &lt;/script&gt;
  &lt;/polymer&gt;
  
  &lt;div id="container"&gt;&lt;/div&gt;
  
  &lt;script&gt;
    document.addEventListener('polymer-ready',function() {
      var foo = new MyFoo();
      foo.controller = {
          options : {
              name : "here"
         }
      };
      document.body.appendChild(foo);
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>attribute "controller" is expected to be a object having a property "options" of type object. </p>
  
  <p>I can create a Instance of the custom element using </p>
  
  <pre><code>var foo = new Foo();
  </code></pre>
  
  <p>but i am unable to set the attribute "controller" which results in an error:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'options' of undefined.
  </code></pre>
  
  <p>Sure - i could modify the options getter in the polymer component to be fail-safe like this : </p>
  
  <pre><code>...
  get options() {
      return this.controller ? this.controller.options : null;
  }
  ...
  </code></pre>
  
  <p>But also in this case the custom element doesnt recognize the applied data.</p>
  
  <p>Final question : How do I pass required attributes to an custom element constructor ?</p>