title: how to write event.target statement for firefox?
body: <p>I am working on a code to close the iframe when user clicks on the outside area. It works fine for chrome but not for firefox. I am still struggling to write the code in html and JS.</p>
  
  <p>HTML :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="video-iframe-div" class="v-iframe-div-off" onclick="closesubpage();"&gt;
      &lt;iframe src="" id="video-iframe" class="v-iframe-off" name="i-video"&gt;
      &lt;/iframe&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>JS:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function closesubpage() {
      var elementDiv = document.getElementById('video-iframe-div');
      var elementIframe = document.getElementById('video-iframe');
     if (event.target != elementIframe) {
       $('#video-iframe-div').prop('className','v-iframe-div-off');
       $('#video-iframe').prop('className','v-iframe-off');
     }
  }</code></pre>
  </div>
  </div>
  </p>