I have noticed the same behavior.
If I addJavascriptInterface after onPageFinished, I get a ReferenceError.
If I addJavascriptInterface before onPageFinished, everything works fine.
This isn't a huge deal for me, but it should at least be documented.
--
You received this message because you
Thanks, Sukumar
My understanding is that MyLateJavaObject is not represented in
Javascript as an object, so there are limited things we can do with
it. From experimentation:
e.g. you can do this:
var obj = MyJavaObject;
obj.method();
But not this:
var fn = MyJavaObject.method;
method();
It
James,
Have you verified your JavaScript isn't already executed before this
event occurs?
-Dan
On Jan 20, 9:43 am, jamesh jameshug...@gmail.com wrote:
Hi,
I'm trying to add Java objects to a WebView, such that they are
available to Javascript.
I can prove that if I do:
Hi, Dan
The Javascript is already in memory (i.e. loaded by Webkit): I can
call functions/methods on that code from Java.
mWebView.loadUrl(file///android_assets/index.html); // loads a bunch
of javascript.
The onPageFinished method runs, and the page is ready.
This javascript doesn't do
4 matches
Mail list logo