I'm in the process of incorporating a header bar into the web view for my app. Utilizing the cordova inAppBrowser
plugin to achieve this, I tested using the following code:
var win = window.open( URL, "_blank", 'location=yes' );
win.addEventListener( "loadstop", function() {
win.executeScript({ code: "alert( 'hello' );" });
});
The URL is successfully opened, however, no alert appears in the web view.
UPDATE:
Upon further investigation, it became evident that the method executeScript()
is not defined. This results in an error message, "
TypeError: undefined is not a function
". Similar issues occur with win.show()
and win.addEventListener()
. Strangely, only open()
and close()
are functioning as expected. Could there be an issue with the installation?