chromium/third_party/blink/renderer/modules/smart_card/smart_card_error.idl

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://wicg.github.io/web-smart-card/#smartcarderror-interface

enum SmartCardResponseCode {
  "no-service",
  "no-smartcard",
  "not-ready",
  "not-transacted",
  "proto-mismatch",
  "reader-unavailable",
  "removed-card",
  "reset-card",
  "server-too-busy",
  "sharing-violation",
  "system-cancelled",
  "unknown-reader",
  "unpowered-card",
  "unresponsive-card",
  "unsupported-card",
  "unsupported-feature"
};

dictionary SmartCardErrorOptions {
  required SmartCardResponseCode responseCode;
};

[
  Exposed=Window,
  RuntimeEnabled=SmartCard,
  SecureContext,
  IsolatedContext
] interface SmartCardError : DOMException {
  constructor(DOMString message, SmartCardErrorOptions options);
  readonly attribute SmartCardResponseCode responseCode;
};