google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.38k stars 596 forks source link

[WebView] Is addJavascriptInterface supported? #1660

Closed mshearer-hubspot closed 1 year ago

mshearer-hubspot commented 1 year ago

Description Trying to implement addJavascriptInterface currently. Thought I'd ask if this is supported as i'm not seeing any activity and spotted https://github.com/google/accompanist/issues/1150

Steps to reproduce

Expected behavior

Additional context

bentrengrove commented 1 year ago

It's meant to be a simple wrapper so I think if you need something super custom you will have more luck forking this wrapper and adding any functionality you need yourself but just a javascript interface should work I would think. It's not tested but if you just add it in onCreated I would think it would work.

WebView(
   onCreated = { it.addJavascriptInterface(MyInterface()) }
)