PI(context) {
    return {
      contentScripts: {
        register(options) {
          return context.cloneScope.Promise.resolve().then(async () => {
            const scriptId = await context.childManager.callParentAsyncFunction(
              "contentScripts.register",
              [options]
            );

            const registeredScript = new ContentScriptChild(context, scriptId);

            return Cu.cloneInto(registeredScript.api(), context.cloneScope, {
              cloneFunctions: true,
            });
          });
        },
      },
    };
  }
};
PK