tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

web-nfc.idl (2088B)


      1 // GENERATED CONTENT - DO NOT EDIT
      2 // Content was automatically extracted by Reffy into webref
      3 // (https://github.com/w3c/webref)
      4 // Source: Web NFC (https://w3c.github.io/web-nfc/)
      5 
      6 [SecureContext, Exposed=Window]
      7 interface NDEFMessage {
      8  constructor(NDEFMessageInit messageInit);
      9  readonly attribute FrozenArray<NDEFRecord> records;
     10 };
     11 
     12 dictionary NDEFMessageInit {
     13  required sequence<NDEFRecordInit> records;
     14 };
     15 
     16 [SecureContext, Exposed=Window]
     17 interface NDEFRecord {
     18  constructor(NDEFRecordInit recordInit);
     19 
     20  readonly attribute USVString recordType;
     21  readonly attribute USVString? mediaType;
     22  readonly attribute USVString? id;
     23  readonly attribute DataView? data;
     24 
     25  readonly attribute USVString? encoding;
     26  readonly attribute USVString? lang;
     27 
     28  sequence<NDEFRecord>? toRecords();
     29 };
     30 
     31 dictionary NDEFRecordInit {
     32  required USVString recordType;
     33  USVString mediaType;
     34  USVString id;
     35 
     36  USVString encoding;
     37  USVString lang;
     38 
     39  any data; // DOMString or BufferSource or NDEFMessageInit
     40 };
     41 
     42 typedef (DOMString or BufferSource or NDEFMessageInit) NDEFMessageSource;
     43 
     44 [SecureContext, Exposed=Window]
     45 interface NDEFReader : EventTarget {
     46  constructor();
     47 
     48  attribute EventHandler onreading;
     49  attribute EventHandler onreadingerror;
     50 
     51  Promise<undefined> scan(optional NDEFScanOptions options={});
     52  Promise<undefined> write(NDEFMessageSource message,
     53                                 optional NDEFWriteOptions options={});
     54  Promise<undefined> makeReadOnly(optional NDEFMakeReadOnlyOptions options={});
     55 };
     56 
     57 [SecureContext, Exposed=Window]
     58 interface NDEFReadingEvent : Event {
     59  constructor(DOMString type, NDEFReadingEventInit readingEventInitDict);
     60 
     61  readonly attribute DOMString serialNumber;
     62  [SameObject] readonly attribute NDEFMessage message;
     63 };
     64 
     65 dictionary NDEFReadingEventInit : EventInit {
     66  DOMString? serialNumber = "";
     67  required NDEFMessageInit message;
     68 };
     69 
     70 dictionary NDEFWriteOptions {
     71  boolean overwrite = true;
     72  AbortSignal? signal;
     73 };
     74 
     75 dictionary NDEFMakeReadOnlyOptions {
     76  AbortSignal? signal;
     77 };
     78 
     79 dictionary NDEFScanOptions {
     80  AbortSignal signal;
     81 };