onTruncateRequested property

EventStream<OnTruncateRequestedEvent> get onTruncateRequested

Raised when truncating a file to a desired length is requested. If an error occurs, then errorCallback must be called.

Implementation

EventStream<OnTruncateRequestedEvent> get onTruncateRequested =>
    $js.chrome.fileSystemProvider.onTruncateRequested.asStream(($c) => (
          $js.TruncateRequestedOptions options,
          $js.ProviderSuccessCallback successCallback,
          $js.ProviderErrorCallback errorCallback,
        ) {
          return $c(OnTruncateRequestedEvent(
            options: TruncateRequestedOptions.fromJS(options),
            successCallback: () {
              successCallback.callAsFunction(
                null,
              );
            },
            errorCallback: (ProviderError error) {
              errorCallback.callAsFunction(null, error.toJS);
            },
          ));
        }.toJS);