kvision / pl.treksoft.kvision.electron / WebContents

WebContents

(js) open class WebContents : EventEmitter

Constructors

(js)

<init>

WebContents()

Properties

(js)

debugger

open var debugger: Debugger
(js)

devToolsWebContents

open var devToolsWebContents: WebContents
(js)

hostWebContents

open var hostWebContents: WebContents
(js)

id

open var id: Number
(js)

session

open var session: Session

Functions

(js)

addListener

open fun addListener(event: String, listener: (event: Event, input: Input) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, url: String, error: String, certificate: Certificate, callback: (isTrusted: Boolean) -> Unit) -> Unit): WebContents
open fun addListener(event: String, listener: (level: Number, message: String, line: Number, sourceId: String) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, params: ContextMenuParams) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, killed: Boolean) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, type: String, image: NativeImage?, scale: Number?, size: Size?, hotspot: Point?) -> Unit): WebContents
open fun addListener(event: String, listener: Function<*>): WebContents
open fun addListener(event: String, listener: (event: Event, webContents: WebContents) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, color: String?) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, errorCode: Number, errorDescription: String, validatedURL: String, isMainFrame: Boolean) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, isMainFrame: Boolean) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, oldURL: String, newURL: String, isMainFrame: Boolean, httpResponseCode: Number, requestMethod: String, referrer: String, headers: Any) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, status: Boolean, newURL: String, originalURL: String, httpResponseCode: Number, requestMethod: String, referrer: String, headers: Any, resourceType: String) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, url: String) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, url: String, isMainFrame: Boolean) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, result: Result) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, request: Request, authInfo: AuthInfo, callback: (username: String, password: String) -> Unit) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, url: String, frameName: String, dynamic, options: Any, additionalFeatures: Array<String>) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, favicons: Array<String>) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, dirtyRect: Rectangle, image: NativeImage) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, name: String, version: String) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, devices: Array<BluetoothDevice>, callback: (deviceId: String) -> Unit) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, url: String, certificateList: Array<Certificate>, callback: (certificate: Certificate) -> Unit) -> Unit): WebContents
open fun addListener(event: String, listener: (event: Event, webPreferences: Any, params: Any) -> Unit): WebContents
(js)

addWorkSpace

open fun addWorkSpace(path: String): Unit
(js)

beginFrameSubscription

open fun beginFrameSubscription(callback: (frameBuffer: Buffer, dirtyRect: Rectangle) -> Unit): Unit
open fun beginFrameSubscription(onlyDirty: Boolean, callback: (frameBuffer: Buffer, dirtyRect: Rectangle) -> Unit): Unit
(js)

canGoBack

open fun canGoBack(): Boolean
(js)

canGoForward

open fun canGoForward(): Boolean
(js)

canGoToOffset

open fun canGoToOffset(offset: Number): Boolean
(js)

capturePage

open fun capturePage(callback: (image: NativeImage) -> Unit): Unit
open fun capturePage(rect: Rectangle, callback: (image: NativeImage) -> Unit): Unit
(js)

clearHistory

open fun clearHistory(): Unit
(js)

closeDevTools

open fun closeDevTools(): Unit
(js)

copy

open fun copy(): Unit
(js)

copyImageAt

open fun copyImageAt(x: Number, y: Number): Unit
(js)

cut

open fun cut(): Unit
(js)

delete

open fun delete(): Unit
(js)

disableDeviceEmulation

open fun disableDeviceEmulation(): Unit
(js)

downloadURL

open fun downloadURL(url: String): Unit
(js)

enableDeviceEmulation

open fun enableDeviceEmulation(parameters: Parameters): Unit
(js)

endFrameSubscription

open fun endFrameSubscription(): Unit
(js)

executeJavaScript

open fun executeJavaScript(code: String, userGesture: Boolean? = definedExternally, callback: ((result: Any) -> Unit)? = definedExternally): Promise<Any>
(js)

findInPage

open fun findInPage(text: String, options: FindInPageOptions? = definedExternally): Number
(js)

focus

open fun focus(): Unit
(js)

getFrameRate

open fun getFrameRate(): Number
(js)

getOSProcessId

open fun getOSProcessId(): Number
(js)

getPrinters

open fun getPrinters(): Array<PrinterInfo>
(js)

getTitle

open fun getTitle(): String
(js)

getURL

open fun getURL(): String
(js)

getUserAgent

open fun getUserAgent(): String
(js)

getWebRTCIPHandlingPolicy

open fun getWebRTCIPHandlingPolicy(): String
(js)

getZoomFactor

open fun getZoomFactor(callback: (zoomFactor: Number) -> Unit): Unit
(js)

getZoomLevel

open fun getZoomLevel(callback: (zoomLevel: Number) -> Unit): Unit
(js)

goBack

open fun goBack(): Unit
(js)

goForward

open fun goForward(): Unit
(js)

goToIndex

open fun goToIndex(index: Number): Unit
(js)

goToOffset

open fun goToOffset(offset: Number): Unit
(js)

hasServiceWorker

open fun hasServiceWorker(callback: (hasWorker: Boolean) -> Unit): Unit
(js)

insertCSS

open fun insertCSS(css: String): Unit
(js)

insertText

open fun insertText(text: String): Unit
(js)

inspectElement

open fun inspectElement(x: Number, y: Number): Unit
(js)

inspectServiceWorker

open fun inspectServiceWorker(): Unit
(js)

invalidate

open fun invalidate(): Unit
(js)

isAudioMuted

open fun isAudioMuted(): Boolean
(js)

isCrashed

open fun isCrashed(): Boolean
(js)

isDestroyed

open fun isDestroyed(): Boolean
(js)

isDevToolsFocused

open fun isDevToolsFocused(): Boolean
(js)

isDevToolsOpened

open fun isDevToolsOpened(): Boolean
(js)

isFocused

open fun isFocused(): Boolean
(js)

isLoading

open fun isLoading(): Boolean
(js)

isLoadingMainFrame

open fun isLoadingMainFrame(): Boolean
(js)

isOffscreen

open fun isOffscreen(): Boolean
(js)

isPainting

open fun isPainting(): Boolean
(js)

isWaitingForResponse

open fun isWaitingForResponse(): Boolean
(js)

loadFile

open fun loadFile(filePath: String): Unit
(js)

loadURL

open fun loadURL(url: String, options: LoadURLOptions? = definedExternally): Unit
(js)

on

open fun on(event: String, listener: (event: Event, input: Input) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, url: String, error: String, certificate: Certificate, callback: (isTrusted: Boolean) -> Unit) -> Unit): WebContents
open fun on(event: String, listener: (level: Number, message: String, line: Number, sourceId: String) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, params: ContextMenuParams) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, killed: Boolean) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, type: String, image: NativeImage?, scale: Number?, size: Size?, hotspot: Point?) -> Unit): WebContents
open fun on(event: String, listener: Function<*>): WebContents
open fun on(event: String, listener: (event: Event, webContents: WebContents) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, color: String?) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, errorCode: Number, errorDescription: String, validatedURL: String, isMainFrame: Boolean) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, isMainFrame: Boolean) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, oldURL: String, newURL: String, isMainFrame: Boolean, httpResponseCode: Number, requestMethod: String, referrer: String, headers: Any) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, status: Boolean, newURL: String, originalURL: String, httpResponseCode: Number, requestMethod: String, referrer: String, headers: Any, resourceType: String) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, url: String) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, url: String, isMainFrame: Boolean) -> Unit): WebContents
open fun on(event: String, listener: (event: Event) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, result: Result) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, request: Request, authInfo: AuthInfo, callback: (username: String, password: String) -> Unit) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, url: String, frameName: String, dynamic, options: Any, additionalFeatures: Array<String>) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, favicons: Array<String>) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, dirtyRect: Rectangle, image: NativeImage) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, name: String, version: String) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, devices: Array<BluetoothDevice>, callback: (deviceId: String) -> Unit) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, url: String, certificateList: Array<Certificate>, callback: (certificate: Certificate) -> Unit) -> Unit): WebContents
open fun on(event: String, listener: (event: Event, webPreferences: Any, params: Any) -> Unit): WebContents
(js)

once

open fun once(event: String, listener: (event: Event, input: Input) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, url: String, error: String, certificate: Certificate, callback: (isTrusted: Boolean) -> Unit) -> Unit): WebContents
open fun once(event: String, listener: (level: Number, message: String, line: Number, sourceId: String) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, params: ContextMenuParams) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, killed: Boolean) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, type: String, image: NativeImage?, scale: Number?, size: Size?, hotspot: Point?) -> Unit): WebContents
open fun once(event: String, listener: Function<*>): WebContents
open fun once(event: String, listener: (event: Event, webContents: WebContents) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, color: String?) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, errorCode: Number, errorDescription: String, validatedURL: String, isMainFrame: Boolean) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, isMainFrame: Boolean) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, oldURL: String, newURL: String, isMainFrame: Boolean, httpResponseCode: Number, requestMethod: String, referrer: String, headers: Any) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, status: Boolean, newURL: String, originalURL: String, httpResponseCode: Number, requestMethod: String, referrer: String, headers: Any, resourceType: String) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, url: String) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, url: String, isMainFrame: Boolean) -> Unit): WebContents
open fun once(event: String, listener: (event: Event) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, result: Result) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, request: Request, authInfo: AuthInfo, callback: (username: String, password: String) -> Unit) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, url: String, frameName: String, dynamic, options: Any, additionalFeatures: Array<String>) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, favicons: Array<String>) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, dirtyRect: Rectangle, image: NativeImage) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, name: String, version: String) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, devices: Array<BluetoothDevice>, callback: (deviceId: String) -> Unit) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, url: String, certificateList: Array<Certificate>, callback: (certificate: Certificate) -> Unit) -> Unit): WebContents
open fun once(event: String, listener: (event: Event, webPreferences: Any, params: Any) -> Unit): WebContents
(js)

openDevTools

open fun openDevTools(options: OpenDevToolsOptions? = definedExternally): Unit
(js)

paste

open fun paste(): Unit
(js)

pasteAndMatchStyle

open fun pasteAndMatchStyle(): Unit
(js)

print

open fun print(options: PrintOptions? = definedExternally, callback: ((success: Boolean) -> Unit)? = definedExternally): Unit
(js)

printToPDF

open fun printToPDF(options: PrintToPDFOptions, callback: (error: Error, data: Buffer) -> Unit): Unit
(js)

redo

open fun redo(): Unit
(js)

reload

open fun reload(): Unit
(js)

reloadIgnoringCache

open fun reloadIgnoringCache(): Unit
(js)

removeListener

open fun removeListener(event: String, listener: (event: Event, input: Input) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, url: String, error: String, certificate: Certificate, callback: (isTrusted: Boolean) -> Unit) -> Unit): WebContents
open fun removeListener(event: String, listener: (level: Number, message: String, line: Number, sourceId: String) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, params: ContextMenuParams) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, killed: Boolean) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, type: String, image: NativeImage?, scale: Number?, size: Size?, hotspot: Point?) -> Unit): WebContents
open fun removeListener(event: String, listener: Function<*>): WebContents
open fun removeListener(event: String, listener: (event: Event, webContents: WebContents) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, color: String?) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, errorCode: Number, errorDescription: String, validatedURL: String, isMainFrame: Boolean) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, isMainFrame: Boolean) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, oldURL: String, newURL: String, isMainFrame: Boolean, httpResponseCode: Number, requestMethod: String, referrer: String, headers: Any) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, status: Boolean, newURL: String, originalURL: String, httpResponseCode: Number, requestMethod: String, referrer: String, headers: Any, resourceType: String) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, url: String) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, url: String, isMainFrame: Boolean) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, result: Result) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, request: Request, authInfo: AuthInfo, callback: (username: String, password: String) -> Unit) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, url: String, frameName: String, dynamic, options: Any, additionalFeatures: Array<String>) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, favicons: Array<String>) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, dirtyRect: Rectangle, image: NativeImage) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, name: String, version: String) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, devices: Array<BluetoothDevice>, callback: (deviceId: String) -> Unit) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, url: String, certificateList: Array<Certificate>, callback: (certificate: Certificate) -> Unit) -> Unit): WebContents
open fun removeListener(event: String, listener: (event: Event, webPreferences: Any, params: Any) -> Unit): WebContents
(js)

removeWorkSpace

open fun removeWorkSpace(path: String): Unit
(js)

replace

open fun replace(text: String): Unit
(js)

replaceMisspelling

open fun replaceMisspelling(text: String): Unit
(js)

savePage

open fun savePage(fullPath: String, saveType: String, callback: (error: Error) -> Unit): Boolean
(js)

selectAll

open fun selectAll(): Unit
(js)

send

open fun send(channel: String, vararg args: Any): Unit
(js)

sendInputEvent

open fun sendInputEvent(event: Event): Unit
(js)

setAudioMuted

open fun setAudioMuted(muted: Boolean): Unit
(js)

setDevToolsWebContents

open fun setDevToolsWebContents(devToolsWebContents: WebContents): Unit
(js)

setFrameRate

open fun setFrameRate(fps: Number): Unit
(js)

setIgnoreMenuShortcuts

open fun setIgnoreMenuShortcuts(ignore: Boolean): Unit
(js)

setLayoutZoomLevelLimits

open fun setLayoutZoomLevelLimits(minimumLevel: Number, maximumLevel: Number): Unit
(js)

setSize

open fun setSize(options: SizeOptions): Unit
(js)

setUserAgent

open fun setUserAgent(userAgent: String): Unit
(js)

setVisualZoomLevelLimits

open fun setVisualZoomLevelLimits(minimumLevel: Number, maximumLevel: Number): Unit
(js)

setWebRTCIPHandlingPolicy

open fun setWebRTCIPHandlingPolicy(policy: String): Unit
(js)

setZoomFactor

open fun setZoomFactor(factor: Number): Unit
(js)

setZoomLevel

open fun setZoomLevel(level: Number): Unit
(js)

showDefinitionForSelection

open fun showDefinitionForSelection(): Unit
(js)

startDrag

open fun startDrag(item: Item): Unit
(js)

startPainting

open fun startPainting(): Unit
(js)

stop

open fun stop(): Unit
(js)

stopFindInPage

open fun stopFindInPage(action: String): Unit
(js)

stopPainting

open fun stopPainting(): Unit
(js)

toggleDevTools

open fun toggleDevTools(): Unit
(js)

undo

open fun undo(): Unit
(js)

unregisterServiceWorker

open fun unregisterServiceWorker(callback: (success: Boolean) -> Unit): Unit
(js)

unselect

open fun unselect(): Unit

Companion Object Functions

(js)

fromId

fun fromId(id: Number): WebContents
(js)

getAllWebContents

fun getAllWebContents(): Array<WebContents>
(js)

getFocusedWebContents

fun getFocusedWebContents(): WebContents