mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Update web-platform-tests to revision 74efe51f1faaa2bf3ff91c10f05a4ad9615a1553
This commit is contained in:
parent
267ce462d8
commit
dacb7e9002
49 changed files with 2889 additions and 59 deletions
|
@ -24,6 +24,14 @@ function toMojoNDEFMessage(message) {
|
|||
|
||||
function toMojoNDEFRecord(record) {
|
||||
let nfcRecord = new device.mojom.NDEFRecord();
|
||||
if (record.recordType.search(':') != -1) {
|
||||
// Simply checks the existence of ':' to decide whether it's an external
|
||||
// type. As a mock, no need to really implement the validation algo at
|
||||
// https://w3c.github.io/web-nfc/#dfn-validate-external-type.
|
||||
nfcRecord.category = device.mojom.NDEFRecordTypeCategory.kExternal;
|
||||
} else {
|
||||
nfcRecord.category = device.mojom.NDEFRecordTypeCategory.kStandardized;
|
||||
}
|
||||
nfcRecord.recordType = record.recordType;
|
||||
nfcRecord.mediaType = record.mediaType;
|
||||
nfcRecord.id = record.id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue