title: How to add a <script> element to the DOM and execute its code?
body: <p>I want to add a  element into the existing DOM to have the javascript code run.</p>
  
  <p>I did this with YUI:</p>
  
  <pre><code>var scriptNode = Y.Node.create('&lt;script type="text/javascript" charset="utf-8"&gt;alert("Hello world!");&lt;\/script&gt;');
  var headNode = Y.one('head');
  headNode.append(scriptNode);
  </code></pre>
  
  <p>It's successfully added to the DOM but it doesn't give me an alert.</p>
  
  <p>Someone knows what the problem is?</p>