commonMain.tech.skot.core.components.SKWebView.kt Maven / Gradle / Ivy
package tech.skot.core.components
import tech.skot.core.di.coreViewInjector
class SKWebView(config: SKWebViewVC.Config, openUrl: SKWebViewVC.OpenUrl?) :
SKComponent() {
constructor(url: String) : this(SKWebViewVC.Config(null), SKWebViewVC.OpenUrl(url))
override val view = coreViewInjector.webView(config, openUrl)
fun back(onCantBack: (() -> Unit)? = null) {
view.goBack = SKWebViewVC.BackRequest(onCantBack)
}
fun forward() {
view.requestGoForward()
}
fun reload() {
view.requestReload()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy