title: Polymer undefined property in custom function
body: <p>I use <strong>Polymer</strong> (v1.0) and I want to create a simple element which can show me some extra content <strong>depending on a property</strong> and it has to work with <strong>multiple values</strong> - a.k.a simple "<strong>switch</strong>".</p>
  
  <p>I wrote this code.</p>
  
  <pre><code>...
      &lt;span&gt;{{for}}&lt;/span&gt;
      &lt;template is="dom-if" if="{{checkFor('alfa')}}"&gt;
          hi !!!
      &lt;/template&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
      Polymer({
          is: "...",
  
          properties: {
              for: String,
              user: String,
              manager: {
                  type: Boolean,
                  notify: true
              }
          },
  
          attached: function() {
              this.textContent = 'Hello World, my user is ' + (this.user || 'nobody') + '.\n' +
                      'This user is ' + (this.manager ? '' : 'not') + ' a manager and he likes ' + this.for + '.';
          },
  
  
          checkFor: function (aaa) {
              // return aaa === this.for;
  
              this.textContent = 'Hello World, my user is ' + (this.user || 'nobody') + '.\n' +
                      'This user is ' + (this.manager ? '' : 'not') + ' a manager and he likes ' + this.for + '.';
          }
      });
  &lt;/script&gt;
  </code></pre>
  
  <p></p>
  
  <p>My function <code>checkFor</code> is used to check if a value I want to have (for example 'alfa') is equal with element property/attribute <code>for</code>.</p>
  
  <p>But it doesn't worked at all so I tried to check values using console.log(). After than I discovered variable <code>aaa</code> contains 'alfa' and variable <code>this.for</code> contains <code>undefined</code>. </p>
  
  <p>Then I copied some output code I found which use element properties and it also did not work. If I run the same code in <code>attached</code> function it works fine.</p>
  
  <p><strong>How can I use element properties in custom functions?</strong></p>