title: Polymer sample code not working in firefox
body: <p>I am trying out sample code provided by Google at <a href="https://www.polymer-project.org/1.0/start/first-element/intro" rel="nofollow noreferrer">https://www.polymer-project.org/1.0/start/first-element/intro</a>.</p>
  
  <p>This is what I have so far:</p>
  
  <p>index.html:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;                                                                                                          
  &lt;html lang="en"&gt;                                                                                                         
    &lt;head&gt;                                                                                                                 
      &lt;meta charset="utf8"&gt;                                                                                                
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;                                                                
      &lt;meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"&gt;              
      &lt;script src="https://polygit.org/components/webcomponentsjs/webcomponents-lite.js"&gt;&lt;/script&gt;                         
      &lt;link href="/my_components/icon-toggle-demo.html" rel="import"&gt;                                                      
    &lt;/head&gt;                                                                                                                
    &lt;body&gt;                                                                                                                 
      &lt;icon-toggle-demo toggle-icon="star"&gt;&lt;/icon-toggle-demo&gt;                                                             
    &lt;/body&gt;                                                                                                                
  &lt;/html&gt;  
  </code></pre>
  
  <p>icon-toggle-demo.html:</p>
  
  <pre><code>&lt;link rel="import" href="https://polygit.org/components/polymer/polymer.html"&gt;                                              
  &lt;link rel="import" href="https://polygit.org/components/iron-icons/iron-icons.html"&gt;                                        
  &lt;link rel="import" href="icon-toggle.html"&gt;                                                                                 
  
  
  &lt;dom-module id="icon-toggle-demo"&gt;                                                                                          
    &lt;template&gt;                                                                                                                
      &lt;style&gt;                                                                                                                 
        :host {                                                                                                               
          font-family: sans-serif;                                                                                            
        };                                                                                                                    
      &lt;/style&gt;                                                                                                                
  
      &lt;h3&gt;Statically-configured icon-toggles&lt;/h3&gt;                                                                             
  
      &lt;icon-toggle toggle-icon="star"&gt;&lt;/icon-toggle&gt;                                                                          
      &lt;icon-toggle toggle-icon="star" pressed&gt;&lt;/icon-toggle&gt;                                                                  
  
      &lt;h3&gt;Data-bound icon-toggle&lt;/h3&gt;                                                                                         
  
      &lt;!-- use a computed binding to generate the message --&gt;                                                                 
      &lt;div&gt;&lt;span&gt;[[message(isFav)]]&lt;/span&gt;&lt;/div&gt;                                                                              
  
      &lt;!-- curly brackets ({{}}} allow two-way binding --&gt;                                                                    
      &lt;icon-toggle toggle-icon="favorite" pressed="{{isFav}}"&gt;&lt;/icon-toggle&gt;                                                  
    &lt;/template&gt;                                                                                                               
  
    &lt;script&gt;                                                                                                                  
      Polymer({                                                                                                               
        is: "icon-toggle-demo",                                                                                               
        message: function(fav) {                                                                                              
          if (fav) {                                                                                                          
            return "You really like me!";                                                                                     
          } else {                                                                                                            
            return "Do you like me?";                                                                                         
          }                                                                                                                   
        }                                                                                                                     
      });                                                                                                                     
    &lt;/script&gt;                                                                                                                 
  &lt;/dom-module&gt; 
  </code></pre>
  
  <p>icon-toggle.html:</p>
  
  <pre><code>&lt;link rel="import" href="https://polygit.org/components/polymer/polymer.html"&gt;                                              
  &lt;link rel="import" href="https://polygit.org/components/iron-icon/iron-icon.html"&gt;                                          
  
  &lt;dom-module id="icon-toggle"&gt;                                                                                               
  
    &lt;template&gt;                                                                                                                
  
      &lt;style&gt;                                                                                                                 
        /* local DOM styles go here */                                                                                        
        :host {                                                                                                               
          display: inline-block;                                                                                              
        }                                                                                                                     
  
        iron-icon {                                                                                                           
          fill: rgba(0,0,0,0);                                                                                                
          stroke: currentcolor;                                                                                               
        }                                                                                                                     
        :host([pressed]) iron-icon {                                                                                          
          fill: currentcolor;                                                                                                 
        }                                                                                                                     
  
      &lt;/style&gt;                                                                                                                
  
      &lt;!-- local DOM goes here --&gt;                                                                                            
      &lt;!-- &lt;span&gt;Not much here yet.&lt;/span&gt; --&gt;                                                                                
      &lt;!-- &lt;iron-icon icon="polymer"&gt; --&gt;                                                                                     
      &lt;iron-icon icon="[[toggleIcon]]"&gt;                                                                                       
      &lt;/iron-icon&gt;                                                                                                            
    &lt;/template&gt;                                                                                                               
  
    &lt;script&gt;                                                                                                                  
    Polymer({                                                                                                                 
      is: 'icon-toggle',                                                                                                      
      properties: {                                                                                                           
        toggleIcon: String,                                                                                                   
        pressed: {                                                                                                            
          type: Boolean,                                                                                                      
          value: false,                                                                                                       
          notify: true,                                                                                                       
          reflectToAttribute: true                                                                                            
        }                                                                                                                     
      },
      listeners: {                                                                                                         
        'tap': 'toggle'                                                                                                    
      },                                                                                                                   
      toggle: function() {                                                                                                 
        this.pressed = !this.pressed;                                                                                      
      }                                                                                                                    
    });                                                                                                                    
    &lt;/script&gt;                                                                                                              
  
  &lt;/dom-module&gt;  
  </code></pre>
  
  <p>The code works fine in chrome but I get following error in FF:</p>
  
  <pre><code>TypeError: document.registerElement is not a function
  </code></pre>
  
  <p>I have already included the polyfill. Something else missing?</p>