草案
此页面不完整。

安全上下文
此特征只可用于 安全上下文 (HTTPS),在某些或所有 支持浏览器 .

这是 实验性技术
检查 浏览器兼容性表格 要小心谨慎在生产中使用这之前。

NDEFReader 接口在 Web NFC API is an abstract interface used to read data from compatible NFC devices, e.g. NFC tags supporting NDEF, when these devices are within the reader's magnetic induction field.

构造函数

NDEFReader.NDEFReader()
返回 NDEFReader with configuration specified in the parameters or default ones if no parameters are specified.

特性

In addition to the properties listed below, NDEFReader 继承来自其父级接口的特性, EventTarget .

NDEFReader.onreading
An event handler for reading event, that notifies about availability of a new reading.
NDEFReader.onerror
An event handler for error event which is called to notify that an error occured during reading.

方法

NDEFReader interface inherits the methods of EventTarget , its parent interface.

NDEFReader.scan()

Called to activate the reader (after ensuring hardware and UA compatibility and obtaining permission from the user) or get an error explaining why feature is not available.

规范

规范 状态 注释
Web NFC, NDEFReader 草案 初始定义。

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
NDEFReader Chrome No Edge No Firefox No IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
NDEFReader() 构造函数 Chrome No Edge No Firefox No IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
onerror Chrome No Edge No Firefox No IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
onread Chrome No Edge No Firefox No IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
scan Chrome No Edge No Firefox No IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
Secure context required Chrome No Edge No Firefox No IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No

图例

不支持

不支持

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

元数据

  • 最后修改:
  1. NDEFReader