# JavascriptInterface

Added in[API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Inherited Methods](https://developer.android.com/reference/android/webkit/JavascriptInterface#inhmethods)  

# JavascriptInterface

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/webkit/JavascriptInterface "View this page in Kotlin")\|Java

`
public


abstract
@interface
JavascriptInterface
`  
`


implements

`[Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation)`


`

|------------------------------------|
| android.webkit.JavascriptInterface |

<br />

*** ** * ** ***

Annotation that allows exposing methods to JavaScript. Starting from API level[Build.VERSION_CODES.JELLY_BEAN_MR1](https://developer.android.com/reference/android/os/Build.VERSION_CODES#JELLY_BEAN_MR1)and above, only methods explicitly marked with this annotation are available to the Javascript code. See[WebView.addJavascriptInterface(Object, String)](https://developer.android.com/reference/android/webkit/WebView#addJavascriptInterface(java.lang.Object,%20java.lang.String))for more information about it.

## Summary

| ### Inherited methods |
|-----------------------|---|
| From interface` `[java.lang.annotation.Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation)` ` |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[Class](https://developer.android.com/reference/java/lang/Class)`<? extends `[Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation)`>` | ` `[annotationType](https://developer.android.com/reference/java/lang/annotation/Annotation#annotationType())`() ` Returns the annotation interface of this annotation.                                                                                                                            | | ` abstract boolean`                                                                                                                                                               | ` `[equals](https://developer.android.com/reference/java/lang/annotation/Annotation#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Returns true if the specified object represents an annotation that is logically equivalent to this one. | | ` abstract int`                                                                                                                                                                   | ` `[hashCode](https://developer.android.com/reference/java/lang/annotation/Annotation#hashCode())`() ` Returns the hash code of this annotation.                                                                                                                                                   | | ` abstract `[String](https://developer.android.com/reference/java/lang/String)                                                                                                    | ` `[toString](https://developer.android.com/reference/java/lang/annotation/Annotation#toString())`() ` Returns a string representation of this annotation.                                                                                                                                         | ||