desktopMain.com.multiplatform.webview.web.DisablePopupWindowsLifeSpanHandler.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compose-webview-multiplatform-desktop Show documentation
Show all versions of compose-webview-multiplatform-desktop Show documentation
WebView for JetBrains Compose Multiplatform
package com.multiplatform.webview.web
import org.cef.browser.CefBrowser
import org.cef.browser.CefFrame
import org.cef.handler.CefLifeSpanHandlerAdapter
class DisablePopupWindowsLifeSpanHandler : CefLifeSpanHandlerAdapter() {
override fun onBeforePopup(
browser: CefBrowser?,
frame: CefFrame?,
target_url: String?,
target_frame_name: String?,
): Boolean {
if (target_url != null) {
browser?.loadURL(target_url)
}
return true
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy