title: UIWebview doesn't execute javascript function
body: <p>I have a website which plays a video and when user pauses the video, my website redirect to another website. The js code is like this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var myPlayer = document.getElementById("example_video_1");
      myPlayer.addEventListener('pause',function(){
          window.location.assign("http://www.baidu.com");
      },false);
  &lt;/script&gt;
  </code></pre>
  
  <p>But when I load this website in UIWebview, the website doesn't redirect to "<a href="http://www.baidu.com" rel="nofollow">http://www.baidu.com</a>" after a user pauses the video. Why is this happening? Thanks.</p>