diff options
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt new file mode 100644 index 00000000..8be4e278 --- /dev/null +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt @@ -0,0 +1,13 @@ +package com.pitchedapps.frost.web + +import android.webkit.JavascriptInterface +import com.pitchedapps.frost.events.WebLaunchEvent +import org.greenrobot.eventbus.EventBus + +/** + * Created by Allan Wang on 2017-06-01. + */ +class FrostJSI { + @JavascriptInterface + fun loadUrl(url: String) = EventBus.getDefault().post(WebLaunchEvent(url)) +}
\ No newline at end of file |