IFrame load() handler gets triggered on declaration on Firefox only
===

Having a handler to be triggered on an iframe's `load()`, like this:

**HTML**

    <iframe id="iframe" name="iframe" src="javascript:'<html></html>'"></iframe>

    <form target="iframe"> 
      ...
    </form>

**JS (with jQuery)**

    $("#iframe").load(afterLoad);

    function afterLoad() {
      var iframeWindow, iframeBody, response;
      iframeWindow = $("#iframe")[0].contentWindow;
      if (iframeWindow) {
        iframeBody = iframeWindow.document.body;
        response = iframeBody.textContent || iframeBody.innerText;
        try {
          return $.parseJSON(response);
        } catch(e) {
          // if the response is not json
          // ERROR: no json response
        }
      } else {
        // error: request couldn't be completed
      }
      return {};
    }

In Chrome, this function is called when the iframe is loaded (when the `form` with `target` pointing to the iframe is sent) and not called on document load. But in Firefox, when the page is rendered it automatically calls `afterLoad` and thus the `ERROR: no json response` case is reached.

I have tried to research but can't explain why would Firefox trigger this handler before the `iframe`'s content is loaded.