Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit 829f7fb

Browse files
author
Anis Kadri
committed
Issue #110 adding loadUrl JS API
1 parent d31027c commit 829f7fb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

www/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,20 @@ module.exports = {
223223
var callback = (typeof headers == "function" ? headers : cb);
224224
exec(callback, callback, 'Sync', 'download', [url, null, headers]);
225225
},
226+
227+
/**
228+
* loadUrl
229+
*
230+
* This method allows loading file:// urls when using WKWebViews on iOS.
231+
*
232+
*/
233+
234+
loadUrl: function(url, cb) {
235+
if(url) {
236+
throw new Error('URL is required.');
237+
}
238+
exec(cb, cb, 'Sync', 'loadUrl', [url]);
239+
},
226240

227241

228242
/**

0 commit comments

Comments
 (0)