onSignDigestRequested property

EventStream<OnSignDigestRequestedEvent> get onSignDigestRequested

This event fires every time the browser needs to sign a message using a certificate provided by this extension in reply to an onCertificatesRequested event. The extension must sign the data in request using the appropriate algorithm and private key and return it by calling reportCallback. reportCallback must be called exactly once. |request|: Contains the details about the sign request.

Implementation

EventStream<OnSignDigestRequestedEvent> get onSignDigestRequested =>
    $js.chrome.certificateProvider.onSignDigestRequested.asStream(($c) => (
          $js.SignRequest request,
          $js.SignCallback reportCallback,
        ) {
          return $c(OnSignDigestRequestedEvent(
            request: SignRequest.fromJS(request),
            reportCallback: (ByteBuffer? signature) {
              //ignore: avoid_dynamic_calls
              (reportCallback as Function)(signature?.toJS);
            },
          ));
        }.toJS);