InAppBrowser: Can I use a local js file with executeScript?

Trying to inject a local js file to a remote site using the inAppBrowser like so

var basePath = window.location.href.replace('index.html', '');
var str = basePath + 'js/test.js';


It only works if str is a remote url though, like

Is it not possible to use a local file?