tor-browser

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

idlharness.https.window.js (700B)


      1 // META: script=/resources/WebIDLParser.js
      2 // META: script=/resources/idlharness.js
      3 // META: timeout=long
      4 
      5 'use strict';
      6 
      7 // https://w3c.github.io/web-nfc/
      8 
      9 const record = {
     10  recordType: "text",
     11  data: "Hello World",
     12  id: "/custom/path"
     13 };
     14 const message = {
     15  url: "/custom/path",
     16  records: [record]
     17 };
     18 
     19 idl_test(
     20  ['web-nfc'],
     21  ['html', 'dom', 'webidl'],
     22  idl_array => {
     23    idl_array.add_objects({
     24      NDEFReader: ['new NDEFReader();'],
     25      NDEFRecord: [`new NDEFRecord(${JSON.stringify(record)});`],
     26      NDEFMessage: [`new NDEFMessage(${JSON.stringify(message)});`],
     27      NDEFReadingEvent: [`new NDEFReadingEvent("reading", { message: ${JSON.stringify(message)} })`],
     28    });
     29  }
     30 );