简体   繁体   中英

How to clear all Javascript function in android

I'm just new in android webview. In my application's webview, It's some Javascript functions for some specific native buttons which is interacted with Webview. However, my problem is, there are so many function in a single webview. I have to check a lot a coditions to detect which funtion is using or not. Can anybody let me know how to reset or clear all Javascript function in webview android?

by default javascript is disable in web view, you can enable it using this method void setJavaScriptEnabled (boolean flag) check out Doc for this method

https://developer.android.com/reference/android/webkit/WebSettings.html#setJavaScriptEnabled(boolean)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM