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

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

The newest version!
package tech.skot.core.components

import tech.skot.core.di.coreViewInjector

class SKWebView(config: SKWebViewVC.Config, launch: SKWebViewVC.Launch?) :
    SKComponent() {

    constructor(url: String) : this(SKWebViewVC.Config(null), SKWebViewVC.Launch.OpenUrl(url))

    override val view = coreViewInjector.webView(config, launch)

    fun back(onCantBack: (() -> Unit)? = null) {
        view.goBack = SKWebViewVC.BackRequest(onCantBack)
    }

    fun forward() {
        view.requestGoForward()
    }

    fun reload() {
        view.requestReload()
    }
 }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy