cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Li, Jonathan" <jonathan...@sap.com>
Subject inAppBrowser API issue
Date Tue, 28 May 2013 14:47:40 GMT
Not sure whether this is a right place for this issue, but the javascript
interface for InAppBrowser does not make much sense. The below code is
from cordova document:

var ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstart', function() { alert(event.url); });

The event handler is added after the open method is returned, so it is
possible the event gets fired before developer has a chance to add the
event handler for the open operation. Although it is async operation, it
is still a good design, and may cause timing or other issues depending on
native side implementation.

Just wonder whether this is a known issue, or could it be changed to a
better interface design?

Thanks
Jonathan


Mime
View raw message