onPrintRequested property

EventStream<OnPrintRequestedEvent> get onPrintRequested

Event fired when print manager requests printing. |printJob|: The printing request parameters. |resultCallback|: Callback that should be called when the printing request is completed.

Implementation

EventStream<OnPrintRequestedEvent> get onPrintRequested =>
    $js.chrome.printerProvider.onPrintRequested.asStream(($c) => (
          $js.PrintJob printJob,
          $js.PrintCallback resultCallback,
        ) {
          return $c(OnPrintRequestedEvent(
            printJob: PrintJob.fromJS(printJob),
            resultCallback: (PrintError result) {
              //ignore: avoid_dynamic_calls
              (resultCallback as Function)(result.toJS);
            },
          ));
        });