summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fenced-frame/resources/web-nfc-inner.https.html
blob: 682805d5d2ccc352f3a645469c2f8d7ccdc1cca6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<script src="utils.js"></script>
<title>Fenced frame content to report the value of Web NFC API</title>

<body>
<script>
async function init() {
  const [ndef_write_key, ndef_scan_key] = parseKeylist();

  const ndef = new NDEFReader();
  ndef.write("Hello").then(
    () => { writeValueToServer(ndef_write_key, "resolved"); },
    () => { writeValueToServer(ndef_write_key, "rejected"); }
  );
  ndef.scan().then(
    () => { writeValueToServer(ndef_scan_key, "resolved"); },
    () => { writeValueToServer(ndef_scan_key, "rejected"); }
  );
}

init();
</script>
</body>