NDEFMessage

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Giao diện NDEFMessage của Web NFC API đại diện cho nội dung của một thông điệp NDEF đã được đọc từ hoặc có thể được ghi vào một thẻ NFC. Một phiên bản được lấy bằng cách gọi hàm khởi tạo NDEFMessage() hoặc từ thuộc tính NDEFReadingEvent.message, được truyền vào sự kiện reading.

Hàm khởi tạo

NDEFMessage() Experimental

Tạo một đối tượng NDEFMessage mới, được khởi tạo với các bản ghi NDEF đã cho.

Thuộc tính

NDEFMessage.records Read only Experimental

Trả về danh sách các bản ghi NDEF có trong thông điệp.

Thông số kỹ thuật

Specification
Web NFC
# dom-ndefmessage

Tương thích trình duyệt