Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we ignore NDEFMessage.serialNumber for NFCWriter::push()? #224

Closed
DonnaWuDongxia opened this issue May 20, 2019 · 4 comments
Closed
Labels
Origin Trial Issues that would be good to solve before OT

Comments

@DonnaWuDongxia
Copy link
Contributor

An attribute |serialNumber| has been added to NDEFMessage dictionary, and it seems only meaningful to NFCReadingEvent.
According to the the push method in Spec, |serialNumber| in NDEFMessage passed to NFCWriter::push() will be ignored. Should we make a clear statement about this?

@kenchris
Copy link
Contributor

Yes, you cannot write the serialnumber.

@kenchris
Copy link
Contributor

dictionary NDEFMessage {
  DOMString? serialNumber;
  sequence<NDEFRecord> records;
  USVString url;
};

NDEFMessage should be renamed NFCMessage. Maybe it is possible to do

dictionary NDEFMessage {
  sequence<NDEFRecord> records;
  USVString url;
};

dictionary NFCMessage : NDEFMessage {
  DOMString? serialNumber;
}

@kenchris kenchris added the Origin Trial Issues that would be good to solve before OT label May 23, 2019
@DonnaWuDongxia
Copy link
Contributor Author

Two types of message may make it confusing for developers. As the |serialNumber| is only meaningful to NFCReadingEvent, how about move the this attribute to this event, making the NDEFMessage more clean.
interface NFCReadingEvent : Event {
DOMString serialNumber;
readonly attribute NDEFMessage message;
};

dictionary NDEFMessage {
sequence records;
USVString url;
};

I think |serialNumber| maybe don't need to be nullable because string can be empty.
Is it definite to rename NDEFMessage to NFCMessage?

@zolkis
Copy link
Contributor

zolkis commented May 24, 2019

The UID is not part of NDEF messages, so I would support moving out the tag specific (low-level) information from NDEF message structure.
We could indeed put it to the read event - however, I wonder whether should we generalize this and define a separate structure/interface for low level tag/adapter info, UID (serial number) being one property in that.

Anyway, at the moment the above proposal looks good to me.

@zolkis zolkis closed this as completed in bd57c26 Jun 12, 2019
zolkis added a commit that referenced this issue Jun 12, 2019
Move serialNumber from NDEFMessage to NFCReadingEvent, fixes #224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Origin Trial Issues that would be good to solve before OT
Projects
None yet
Development

No branches or pull requests

3 participants