title: Javascript generators with the 'yield' keyword
body: <p>I'm experimenting with HTML5's new canvas tag, in which I render and animate some simple shapes. My canvas's script has the following function:</p>
  
  <pre><code>function initializeSquarePositions(rows, columns) {
      for (var x = 0; x &lt; canvas.width; x += canvas.width / columns)
          for (var y = 0; y &lt; canvas.height; y += canvas.height / rows)
              yield {x: x, y: y};
  }
  </code></pre>
  
  <p>For some reason, this code executes wonderfully in Firefox, but it does not work at all in Chrome. Both browsers are the latest version, and I have my script tag marked as version=1.8 (version=1.7 didn't work either).</p>
  
  <p>Is the 'yield' keyword not working in Chrome or something? I sure hope it does; generators make for cleaner code!</p>
  
  <p>I couldn't find any concrete yes or no answers to that question.</p>