title: How do you observe the width of an element in polymer?
body: <p>I was wondering how it is possible to observe changes to an element's css property such as the width.</p>
  
  <p>I tried doing this but it didn't work. Where did I go wrong? Is it possible?</p>
  
  <pre><code>&lt;polymer-element name="test-resize" attributes="elementWidth"&gt;
    &lt;template&gt;
      &lt;p&gt;elementWidth : {{elementWidth}}&lt;/p&gt;
    &lt;/template&gt;
    &lt;script&gt;
      Polymer({
        elementWidth: 100,
        observe: {
          "clientWidth" : "updateWidth",
        },
        updateWidth: function(oldValue, newValue){
          this.elementWidth = newValue;
        }
      });
    &lt;/script&gt;
  &lt;/polymer-element&gt;
  </code></pre>
  
  <p>In this example, I'm trying to observe the <code>clientWidth</code> property which you can normally access from outside.</p>