kvision / pl.treksoft.kvision.electron / WebRequest

WebRequest

open external class WebRequest : EventEmitter

Constructors

<init>

WebRequest()

Functions

onBeforeRedirect

open fun onBeforeRedirect(listener: (details: OnBeforeRedirectDetails) -> Unit): Unit
open fun onBeforeRedirect(filter: OnBeforeRedirectFilter, listener: (details: OnBeforeRedirectDetails) -> Unit): Unit

onBeforeRequest

open fun onBeforeRequest(listener: (details: OnBeforeRequestDetails, callback: (response: Response) -> Unit) -> Unit): Unit
open fun onBeforeRequest(filter: OnBeforeRequestFilter, listener: (details: OnBeforeRequestDetails, callback: (response: Response) -> Unit) -> Unit): Unit

onBeforeSendHeaders

open fun onBeforeSendHeaders(filter: OnBeforeSendHeadersFilter, listener: Function<*>): Unit
open fun onBeforeSendHeaders(listener: Function<*>): Unit

onCompleted

open fun onCompleted(filter: OnCompletedFilter, listener: (details: OnCompletedDetails) -> Unit): Unit
open fun onCompleted(listener: (details: OnCompletedDetails) -> Unit): Unit

onErrorOccurred

open fun onErrorOccurred(listener: (details: OnErrorOccurredDetails) -> Unit): Unit
open fun onErrorOccurred(filter: OnErrorOccurredFilter, listener: (details: OnErrorOccurredDetails) -> Unit): Unit

onHeadersReceived

open fun onHeadersReceived(filter: OnHeadersReceivedFilter, listener: Function<*>): Unit
open fun onHeadersReceived(listener: Function<*>): Unit

onResponseStarted

open fun onResponseStarted(listener: (details: OnResponseStartedDetails) -> Unit): Unit
open fun onResponseStarted(filter: OnResponseStartedFilter, listener: (details: OnResponseStartedDetails) -> Unit): Unit

onSendHeaders

open fun onSendHeaders(filter: OnSendHeadersFilter, listener: (details: OnSendHeadersDetails) -> Unit): Unit
open fun onSendHeaders(listener: (details: OnSendHeadersDetails) -> Unit): Unit

Inherited Functions

addListener

open fun addListener(event: String, listener: Function<*>): EventEmitter

emit

open fun emit(event: String, vararg args: Any): Boolean

eventNames

open fun eventNames(): Array<String>

getMaxListeners

open fun getMaxListeners(): Number

listenerCount

open fun listenerCount(type: String): Number

listeners

open fun listeners(event: String): Array<Function<*>>

on

open fun on(event: String, listener: Function<*>): EventEmitter

once

open fun once(event: String, listener: Function<*>): EventEmitter

prependListener

open fun prependListener(event: String, listener: Function<*>): EventEmitter

prependOnceListener

open fun prependOnceListener(event: String, listener: Function<*>): EventEmitter

removeAllListeners

open fun removeAllListeners(event: String? = definedExternally): EventEmitter

removeListener

open fun removeListener(event: String, listener: Function<*>): EventEmitter

setMaxListeners

open fun setMaxListeners(n: Number): EventEmitter

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.