Test Case Boilerplate

Fork this way...

HTML

<div id="text">init</div>

JavaScript

$(function($) {

  var o={i:5};
  var wrap=$(o);
  wrap.bind('go',onGo)
  wrap.triggerHandler('go');
  $('#text').text('if triggerHandler function were asynchronous, this text should appear before user click on OK button in alert window. But that not the case');
    
  function onGo(e) {
      alert('alert to stop the process');
  }
        
});