Electrode-iOS / Minstrel

An Android Javascript bridge and WebView that accepts all parameter types (object, functions, etc) and handles return values with the same flexibility
MIT License
5 stars 3 forks source link

Reference not found #5

Open ishamkdk opened 8 years ago

ishamkdk commented 8 years ago

Thanks for the breakthrough solution. Since the solution has JavaScript injection, when another page is opened, Webview will clear all the JavaScript for the previous page along with injected JavaScript.This is causing added JavaScript interface is not available.

bsneed commented 8 years ago

Hi @ishamkdk,

I don't know that we intended for that to work as it was built for a single-page web app, however upon load, you could modify the code to make the injection process happen again.

ishamkdk commented 8 years ago

Hi @bsneed,

I was trying to inject JS every time when new page starts loading in onPageStarted() method. But this seem like not fixing the issue. Please let me know if you have any suggestion. Thanks in advance.

bsneed commented 8 years ago

I don't normally do Android development, just did that to prove it could be done. It's been maintained by others since, so if you're pointing to 'master', try the 'ao_update23' branch. This project is in need of being merged and branches cleaned up, so apologies for that. Anyway, they've made quite a few changes from my original implementation so check those out and see if they work better.

ishamkdk commented 8 years ago

@bsneed Thanks for the support. Looks like in ao_update23' branch code has been broken. Anonymous functions are no more working.