[android-developers] Re: WebView pre-executing JavaScript before loading a page

2010-05-26 Thread Maps.Huge.Info (Maps API Guru)
This is more a JavaScript question than an Android one. It sounds to me like you could either inline the JavaScript ahead of the page, which would make it execute first, or add an onload function so that it executes right after the rest of the page is resolved. Either way should work, if I

[android-developers] Re: WebView pre-executing JavaScript before loading a page

2010-05-26 Thread Miguel Paraz
On May 26, 9:47 pm, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: This is more a JavaScript question than an Android one. It sounds to me like you could either inline the JavaScript ahead of the page, which would make it execute first, or add an onload function so that it executes

Re: [android-developers] Re: WebView pre-executing JavaScript before loading a page

2010-05-26 Thread Mark Murphy
Miguel Paraz wrote: On May 26, 9:47 pm, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: This is more a JavaScript question than an Android one. It sounds to me like you could either inline the JavaScript ahead of the page, which would make it execute first, or add an onload function

[android-developers] Re: WebView pre-executing JavaScript before loading a page

2010-05-26 Thread Miguel Paraz
Hi Mark, On May 26, 10:23 pm, Mark Murphy mmur...@commonsware.com wrote: Rather than pushing, you could try pulling: webView.addJavascriptInterface(paraz, new TheMiguelParazObject()); webView.loadUrl(file:///android_asset/page.html); TheMiguelParazObject has some method (e.g., initScript())