title: Why is my onload not working in Wordpress?
body: <p>I really need to use a onload and I don't understand why it's not working. I made a code snippet to test it out and yet again found that it didn't work. Is wordpress doing this? Or am I making a mistake? I found that events such as onclick and onchange are working.</p>
  
  <pre><code>function do_onload_event()
  {
      return '&lt;div id="loadevent" onload="do_show_event(event)"&gt;&lt;/div&gt;' . '&lt;script&gt;
      function do_show_event(event)
      {
          console.log("on load event");
      }
      &lt;/script&gt;';
  }
  add_shortcode('on_load_event','do_onload_event');
  </code></pre>