onCertificatesRequested property
EventStream<void Function(List<CertificateInfo> , void (List<ByteBuffer> ))>
get
onCertificatesRequested
This event fires every time the browser requests the current list of
certificates provided by this extension. The extension must call
reportCallback
exactly once with the current list of
certificates.
Implementation
EventStream<
void Function(
List<CertificateInfo>,
void Function(List<ByteBuffer>),
)>
get onCertificatesRequested =>
$js.chrome.certificateProvider.onCertificatesRequested
.asStream(($c) => ($js.CertificatesCallback reportCallback) {
return $c((List<CertificateInfo> certificates,
void Function(List<ByteBuffer>) callback) {
//ignore: avoid_dynamic_calls
(reportCallback as Function)(
certificates.toJSArray((e) => e.toJS),
(JSArray rejectedCertificates) {
callback(rejectedCertificates.toDart
.cast<JSArrayBuffer>()
.map((e) => e.toDart)
.toList());
});
});
}.toJS);