Spatial Navigation for GeckoView - v3.2.0
    Preparing search index...

    Interface MessagingAdapter

    Abstract messaging adapter interface.

    Implementations handle the platform-specific details of communicating between the web content and the native host.

    interface MessagingAdapter {
        id: string;
        name: string;
        state: ConnectionState;
        connect(): Promise<void>;
        disconnect(): void;
        isAvailable(): boolean;
        on(events: Partial<MessagingEvents>): void;
        onMessage(callback: MessageCallback): () => void;
        send(message: OutboundMessage): boolean;
    }

    Implemented by

    Index

    Properties

    id: string

    Unique identifier for this adapter type.

    name: string

    Human-readable name for logging.

    Current connection state.

    Methods

    • Initialize the adapter and establish connection.

      Returns Promise<void>

      Promise that resolves when connected or rejects on failure.

    • Check if the adapter is available in the current environment.

      Returns boolean

      True if the adapter can be used.