Example usage for android.webkit WebSettings getJavaScriptEnabled

List of usage examples for android.webkit WebSettings getJavaScriptEnabled

Introduction

In this page you can find the example usage for android.webkit WebSettings getJavaScriptEnabled.

Prototype

public abstract boolean getJavaScriptEnabled();

Source Link

Document

Gets whether JavaScript is enabled.

Usage

From source file:android.webkit.AccessibilityInjector.java

/**
 * @return {@code true} if JavaScript is enabled in the {@link WebView}
 *         settings./*from w w  w  .  jav  a  2 s.  c  o  m*/
 */
private boolean isJavaScriptEnabled() {
    final WebSettings settings = mWebView.getSettings();
    if (settings == null) {
        return false;
    }

    return settings.getJavaScriptEnabled();
}