Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4fd2eb5 authored by Selim Gurun's avatar Selim Gurun Committed by Android (Google) Code Review
Browse files

Merge "Minor update to addjavascriptinterface documentation" into jb-mr1-dev

parents 2cd35662 b4c02e6f
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -1494,12 +1494,14 @@ public class WebView extends AbsoluteLayout
     * Injects the supplied Java object into this WebView. The object is
     * Injects the supplied Java object into this WebView. The object is
     * injected into the JavaScript context of the main frame, using the
     * injected into the JavaScript context of the main frame, using the
     * supplied name. This allows the Java object's methods to be
     * supplied name. This allows the Java object's methods to be
     * accessed from JavaScript. For API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
     * accessed from JavaScript. For applications targeted to API
     * level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
     * and above, only public methods that are annotated with
     * and above, only public methods that are annotated with
     * {@link android.webkit.JavascriptInterface} can be accessed from JavaScript.
     * {@link android.webkit.JavascriptInterface} can be accessed from JavaScript.
     * For API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN} or below,
     * For applications targeted to API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN} or below,
     * all public methods (including the inherited ones) can be accessed, see the
     * all public methods (including the inherited ones) can be accessed, see the
     * important security note below for implications. Note that injected objects will not
     * important security note below for implications.
     * <p> Note that injected objects will not
     * appear in JavaScript until the page is next (re)loaded. For example:
     * appear in JavaScript until the page is next (re)loaded. For example:
     * <pre>
     * <pre>
     * class JsObject {
     * class JsObject {
@@ -1514,7 +1516,7 @@ public class WebView extends AbsoluteLayout
     * <ul>
     * <ul>
     * <li> This method can be used to allow JavaScript to control the host
     * <li> This method can be used to allow JavaScript to control the host
     * application. This is a powerful feature, but also presents a security
     * application. This is a powerful feature, but also presents a security
     * risk for applications targeting API level
     * risk for applications targeted to API level
     * {@link android.os.Build.VERSION_CODES#JELLY_BEAN} or below, because
     * {@link android.os.Build.VERSION_CODES#JELLY_BEAN} or below, because
     * JavaScript could use reflection to access an
     * JavaScript could use reflection to access an
     * injected object's public fields. Use of this method in a WebView
     * injected object's public fields. Use of this method in a WebView