Skip to content

Commit 30cd447

Browse files
committed
Java: Add class to represent android.webkit.WebView#addJavascriptInterface
1 parent 8b11e98 commit 30cd447

File tree

1 file changed

+8
-0
lines changed
  • java/ql/lib/semmle/code/java/frameworks/android

1 file changed

+8
-0
lines changed

java/ql/lib/semmle/code/java/frameworks/android/WebView.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ class WebViewGetUrlMethod extends Method {
3939
}
4040
}
4141

42+
/** The method `addJavascriptInterface` of the class `android.webkit.WebView` */
43+
class WebViewAddJavascriptInterfaceMethod extends Method {
44+
WebViewAddJavascriptInterfaceMethod() {
45+
this.getDeclaringType() instanceof TypeWebView and
46+
this.hasName("addJavascriptInterface")
47+
}
48+
}
49+
4250
/**
4351
* A method allowing any-local-file and cross-origin access in the class `android.webkit.WebSettings`.
4452
*/

0 commit comments

Comments
 (0)