All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.tech.skot.core.components.SKWebView.kt Maven / Gradle / Ivy

There is a newer version: 1.2.9
Show newest version
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