@duckduckgo/content-scope-scripts
    Preparing search index...

    Class OnboardingMessages

    This describes the messages that will be sent to the native layer,

    Index

    Properties

    injectName:
        | undefined
        | "firefox"
        | "apple"
        | "apple-isolated"
        | "android"
        | "windows"
        | "integration"
        | "chrome-mv3"
        | "android-broker-protection"
        | "android-autofill-password-import"

    Methods

    • Sends an initial message to the native layer. This is the opportunity for the native layer to provide the initial state of the application or any configuration, for example:

      {
      "stepDefinitions": {
      "systemSettings": {
      "rows": ["dock", "import", "default-browser"]
      }
      },
      "order": "v2",
      "exclude": ["dockSingle"],
      "locale": "en"
      }

      In that example, the native layer is providing the list of rows that should be shown in the systemSettings step, overriding the default list provided in data.js.

      Returns Promise<InitResponse>

    • This will be sent if the application has loaded, but a client-side error has occurred that cannot be recovered from

      Parameters

      • params: {
            id:
                | "summary"
                | "customize"
                | "welcome"
                | "getStarted"
                | "privateByDefault"
                | "cleanerBrowsing"
                | "systemSettings"
                | "dockSingle"
                | "importSingle"
                | "makeDefaultSingle"
                | "duckPlayerSingle";
            message: string;
        }

      Returns void

    • Sent when the user wants to import data. The UI will remain in a loading state until the native layer sends a response.

      Native side should respond when the operation is 'complete'.

      Returns Promise<any>

    • Sent when the user wants to set DuckDuckGo as their default browser. The UI will remain in a loading state until the native layer sends a response.

      Native side should respond when the operation is 'complete'.

      Returns Promise<any>