title: JavaScript not executing inside xul file
body: <p>I am having trouble writing js in a XUL file. I have written a simple method inside xul but it doesn't execute when you open the browser.</p>
  
  <p>This is the method inside the xul tag:</p>
  
  <pre><code>function demo() {
      alert('hello');
  }
  </code></pre>
  
  <p>I ve tried to change the tag of the script from <code>&lt;script&gt;</code> to <code>&lt;html:script&gt;</code> but still method doesn't work. I tried to use methods from external js file using <code>&lt;html:script type="application/x-javascript" src="overlay.js"&gt;</code> still not working. </p>
  
  <p>The name of the xul file is <code>ff-sidebar.xul</code>. Basically what I am trying to do is display text on the sidebar using javascript functions that are in external js files. I really need javascript to work inside xul file so I can use the js methods. I know for sure that nothing is wrong with the js file.</p>