|Modifier and Type||Method and Description|
Called whenever the WebExtension connects to an app using
Called whenever the WebExtension sends a message to an app using
@Nullable default GeckoResult<Object> onMessage(@NonNull String nativeApp, @NonNull Object message, @NonNull WebExtension.MessageSender sender)
nativeApp- The application identifier of the MessageDelegate that sent this message.
message- The message that was sent, either a primitive type or a
WebExtension.MessageSendercorresponding to the frame that originated the message. Note: all messages are to be considered untrusted and should be checked carefully for validity.
GeckoResultthat resolves with a response to the message.
@Nullable default void onConnect(@NonNull WebExtension.Port port)