Commit 6027b660 authored by SerHack's avatar SerHack
Browse files

Update script.js

parent 667aa2e1
// Script for reading, writing NFC tags.
if (!('NDEFReader' in window)) {
console.log("NFC reading not supported");
}
// part for writing
function writeNFC(message){
const writer = new NDEFWriter();
writer.write(message).then(() => {
console.log("Message written.");
}).catch(error => {
console.log(`Write failed :( try again: ${error}.`);
});
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment