• Set up a connection with an extension, identified by its origin. This includes adding an iframe to the document. This requires document.body to exist.

    Gives a promise, so await the result. The promise will hang if the user doesn't have the extension installed.

    This module keeps an inventory of connections that it has already set up, and it'll give you the the connection promise that it already has if it has one.

    The connection stays open, and there is no disconnect.

    Parameters

    • origin: string

      This will look like chrome-extension://xxxxxxxxxxxxxxxxxx

    • path: string = '/oasis-xu-frame.html'

      The path plus the origin will be the URL we use to load the iframe. Default is /oasis-xu-frame.html

    Returns Promise<ExtConnection>