inAppBrowser events working both on app and on browser

Apparently when running on a browser (ionic serve and then connecting to localhost via browser) the inAppBrowser events do not fire, so something like

var ref = window.open(url, '_blank', 'location=no');
ref.addEventListener('loadstop', function (event) {
    console.log("something");
    ref.close();
});

will not write anything on the console. The same code works on the device (ionic run android).

Is there a way to keep the compatibility with the browser (which is useful for debugging)?