demo · v143
Smart Card Connect
Probes navigator.smartCard, lists readers, and sends an APDU you choose. If your environment isn’t cleared for the API, each step reports back exactly what fails — useful for diagnosing the gating.
permissioned API — the Web Smart Card API is exposed only to
Isolated Web Apps with the
smart-card permission policy. In a regular
secure context navigator.smartCard will be absent and the steps below
will say so.
capability probes
send an APDU
step 1 — establishContext
not run yetstep 2 — listReaders
not run yetstep 3 — reader.connect
not run yetstep 4 — connection.transmit
not run yetthe call
const ctx = await navigator.smartCard.establishContext();
const readers = await ctx.listReaders();
const conn = await readers[0].connect("shared");
const resp = await conn.transmit(apduBytes); // Uint8Array
see also
- Web Smart Card API — feature index
- ChromeStatus entry
- Web Smart Card spec