Logo Icon Logo
A Crowd-sourced Cookbook on Writing Great Android® Apps
GitHub logo Twitter logo OReilly Book Cover Art
Don't Allow JavaScript in WebViewBack to Android Cookbook Home | Up to Chapter: Securing Your Application

Author: Ian Darwin ('idarwin')
In Published Edition? Yes
FormatLanguage: AsciiDoc

Don't Allow JavaScript in WebView


You don't want vast swathes of undisciplined code running in every WebView


Don't call setEnableJavaScript(true).


Of course this will break JS frameworks.


The source code for this project is in the Android Cookbook repository, http://github.com/IanDarwin/Android-Cookbook-Examples/tree/master/