WebFrame

external interface WebFrame(source)

Properties

Link copied to clipboard
abstract val firstChild: WebFrame?

A WebFrame | null representing the first child frame of webFrame, the property would be null if webFrame has no children or if first child is not in the current renderer process.

Link copied to clipboard
abstract val nextSibling: WebFrame?

A WebFrame | null representing next sibling frame, the property would be null if webFrame is the last frame in its parent or if the next sibling is not in the current renderer process.

Link copied to clipboard
abstract val opener: WebFrame?

A WebFrame | null representing the frame which opened webFrame, the property would be null if there's no opener or opener is not in the current renderer process.

Link copied to clipboard
abstract val parent: WebFrame?

A WebFrame | null representing parent frame of webFrame, the property would be null if webFrame is top or parent is not in the current renderer process.

Link copied to clipboard
abstract val routingId: Double

An Integer representing the unique frame id in the current renderer process. Distinct WebFrame instances that refer to the same underlying frame will have the same routingId.

Link copied to clipboard
abstract val top: WebFrame?

A WebFrame | null representing top frame in frame hierarchy to which webFrame belongs, the property would be null if top frame is not in the current renderer process.

Functions

Link copied to clipboard
abstract fun clearCache()

Attempts to free memory that is no longer being used (like images from a previous navigation).

Link copied to clipboard
abstract fun executeJavaScript(code: String, userGesture: Boolean = definedExternally, callback: (result: Any?, JsError) -> Unit = definedExternally): Promise<Any?>

A promise that resolves with the result of the executed code or is rejected if execution throws or results in a rejected promise.

Link copied to clipboard
abstract fun executeJavaScriptInIsolatedWorld(worldId: Double, scripts: ReadonlyArray<WebSource>, userGesture: Boolean = definedExternally, callback: (result: Any?, JsError) -> Unit = definedExternally): Promise<Any?>

A promise that resolves with the result of the executed code or is rejected if execution could not start.

Link copied to clipboard
abstract fun findFrameByName(name: String): WebFrame

A child of webFrame with the supplied name, null would be returned if there's no such frame or if the frame is not in the current renderer process.

Link copied to clipboard
abstract fun findFrameByRoutingId(routingId: Double): WebFrame

that has the supplied routingId, null if not found.

Link copied to clipboard
abstract fun getFrameForSelector(selector: String): WebFrame

The frame element in webFrame's document selected by selector, null would be returned if selector does not select a frame or if the frame is not in the current renderer process.

Link copied to clipboard

Returns an object describing usage information of Blink's internal memory caches.

Link copied to clipboard

A list of suggested words for a given word. If the word is spelled correctly, the result will be empty.

Link copied to clipboard
abstract fun getZoomFactor(): Double

The current zoom factor.

Link copied to clipboard
abstract fun getZoomLevel(): Double

The current zoom level.

Link copied to clipboard
abstract fun insertCSS(css: String, options: InsertCSSOptions = definedExternally): String

A key for the inserted CSS that can later be used to remove the CSS via webFrame.removeInsertedCSS(key).

Link copied to clipboard
abstract fun insertText(text: String)

Inserts text to the focused element.

Link copied to clipboard
abstract fun isWordMisspelled(word: String): Boolean

True if the word is misspelled according to the built in spellchecker, false otherwise. If no dictionary is loaded, always return false.

Link copied to clipboard
abstract fun removeInsertedCSS(key: String)

Removes the inserted CSS from the current web page. The stylesheet is identified by its key, which is returned from webFrame.insertCSS(css).

Link copied to clipboard
abstract fun setIsolatedWorldInfo(worldId: Double, info: Info)

Set the security origin, content security policy and name of the isolated world. Note: If the csp is specified, then the securityOrigin also has to be specified.

Link copied to clipboard
abstract fun setSpellCheckProvider(language: String, provider: Provider)

Sets a provider for spell checking in input fields and text areas.

Link copied to clipboard
abstract fun setVisualZoomLevelLimits(minimumLevel: Double, maximumLevel: Double)

Sets the maximum and minimum pinch-to-zoom level.

Link copied to clipboard
abstract fun setZoomFactor(factor: Double)

Changes the zoom factor to the specified factor. Zoom factor is zoom percent divided by 100, so 300% = 3.0.

Link copied to clipboard
abstract fun setZoomLevel(level: Double)

Changes the zoom level to the specified level. The original size is 0 and each increment above or below represents zooming 20% larger or smaller to default limits of 300% and 50% of original size, respectively.