android-components / mozilla.components.concept.engine.webextension / Port


abstract class Port (source)

Represents a port for exchanging messages:


Name Summary
<init> Port(engineSession: EngineSession? = null)
Represents a port for exchanging messages:


Name Summary
engineSession val engineSession: EngineSession?


Name Summary
disconnect abstract fun disconnect(): Unit
Disconnects this port.
name abstract fun name(): String
Returns the name of this port.
postMessage abstract fun postMessage(message: <ERROR CLASS>): Unit
Sends a message to this port.
senderUrl abstract fun senderUrl(): String
Returns the URL of the port sender.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.


Name Summary
GeckoPort class GeckoPort : Port
Gecko-based implementation of Port, wrapping the native port provided by GeckoView.