title: Open a popup automatically and prevent browser to block it
body: <p>I need to call a function (which one will open a popup) when my page is loading.</p>
  
  <p>If I want the popup to be open, the function should be called by a user event (a click or something).</p>
  
  <p>I tried to simulate the <code>click</code> event but it's not isn't working. The function is being called but no <code>click</code> event has been created.</p>
  
  <p>For example, I tried with angular to do the following:</p>
  
  <pre><code>var element = angular.element("&lt;div ng-click='MyFunction()'&gt;&lt;/div&gt;");
              compiled = $compile(element)(scope);
              $timeout(function () {
                  compiled.triggerHandler('click');
              }, 100)
  </code></pre>