Using let and yield in Firefox
<p>I'm trying to use <code>let</code> and <code>yield</code> in Firefox. I am testing in both versions 18 and 21 (Nightly) and getting the same results.</p>

<p>Here's my really simple test script:</p>

<pre><code>&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;test&lt;/title&gt;
        &lt;script type="text/javascript"&gt;
            'use strict';
            function a() {
                yield 5;
            }
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I get this error:</p>

<p><img src="http://i.stack.imgur.com/WGjDD.png" alt="yield is a reserved identifier"></p>

<p>Similarly when I do a simple test with <code>let</code> I get "let is a reserved identifier", which is really frustrating because <code>let</code> <a href="https://developer.mozilla.org/en-US/docs/JavaScript/New_in_JavaScript/1.7" rel="nofollow">has supposedly existed in Firefox since version 2</a>!</p>

<p>Strangely, if I execute the same code in Firebug it works!</p>

<p>I have tried various other strings in the <code>type</code> and <code>language</code> attributes of the <code>script</code> tag but have not found a magic one that works.</p>

<p>What's going on? How do I get this stuff working with a script tag?</p>

<hr>

<h2>Edit</h2>

<p>Hmm, I see, so you must specify the version number. I had tried this, but for my original more complicated script which used web workers. Apparently using <code>version=1.7</code> on a script which includes a web worker which includes a script that uses <code>let</code> and <code>yield</code> isn't good enough -- the web worker script still breaks... Then I tried reducing to simplest case but apparently didn't try <code>version=1.7</code> in simplest case.</p>

<p>Thanks... Might post another question in a little bit (after searching) on how to get this working for web workers.</p>
