This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
The onpeerfound event handler of the
is called when a
MozNFCPeer is detected.
The application has to be running on the foreground (decided by System app) to receive this event.
The default action of this event is to dispatch the event in System app again, and System app will run the default UX behavior (like vibration). So if the application would like to cancel the event, the application should call event.preventDefault() or return false in this event handler.
attribute EventHandler onpeerfound;
peer : The NFCPeer object.
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.