WebContentsView

Constructors

Link copied to clipboard
constructor(options: WebContentsViewConstructorOptions = definedExternally)

WebContentsView

Properties

Link copied to clipboard
Link copied to clipboard

A View[] property representing the child views of this view.

Link copied to clipboard

A WebContents property containing a reference to the displayed WebContents. Use this to interact with the WebContents, for instance to load a URL.

Functions

Link copied to clipboard
fun addChildView(view: View, index: Double = definedExternally)

If the same View is added to a parent which already contains it, it will be reordered such that it becomes the topmost view.

Link copied to clipboard
fun addListener(type: EventType, listener: EventListener)
Link copied to clipboard
fun emit(type: EventType, vararg args: Any?): Boolean
Link copied to clipboard
Link copied to clipboard

The bounds of this View, relative to its parent.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun off(type: EventType, listener: EventListener)
Link copied to clipboard
fun on(type: EventType, listener: EventListener)
Link copied to clipboard
fun once(type: EventType, listener: EventListener)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

If the view passed as a parameter is not a child of this view, this method is a no-op.

Link copied to clipboard
fun removeListener(type: EventType, listener: EventListener)
Link copied to clipboard

Examples of valid color values:

Link copied to clipboard
fun setBorderRadius(radius: Double)

Note: The area cutout of the view's border still captures clicks.

Link copied to clipboard
fun setBounds(bounds: Rectangle)
Link copied to clipboard
Link copied to clipboard
fun setVisible(visible: Boolean)