Re: peer should be nullable in NFCPeerEvent

Hi Yoshi,

We made the peer property in NFCPeerEvent non-nullable because for the 
the event receiver, NFCPeerEvent is useless without it.

Now if I understand the comments below, you guys are discussing it from 
the sender's perspective, that needs to create a NFCPeerEvent. So here 
you may need to create an empty event and then attach a peer before 
sending it.

 From an implementation perspective that seems sensible, but does it 
need to be part of the spec ? I mean, to be exposed to the web app. Is 
it up to the web app to send a NFCPeerEvent ? I was expecting this 
mechanism to be managed under the hood.

However, if you see use cases where the application would need to do 
this, please share. I haven't thought that much about the need for 
sending NFCPeerEvent from an application standpoint, but I may very well 
be missing something.

Thanks for working on this,

Luc

On 05/08/2014 06:11, Yoshi Huang wrote:
> Hi,
> I trid to file a bug but it says 404 here
> http://www.w3.org/2012/nfc/track/issues/open
>
> While we are implementing NFCPeerEvent [1] on FirefoxOS [2]
> We found that the peer property in NFCPeerEvent should be nullable.
> See comments from Olli Pettay from [3] and Boris Zbarsky from [4]
>
> How do you think?
>
> Thank you
>
> [1]:
> http://w3c.github.io/nfc/proposals/common/nfc.html#nfcpeerevent-interface
> [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1046554
> [3]: https://bugzilla.mozilla.org/show_bug.cgi?id=1046554#c5,
> https://bugzilla.mozilla.org/show_bug.cgi?id=1046554#c6
> [4]: https://bugzilla.mozilla.org/show_bug.cgi?id=1047187#c1
>

Received on Tuesday, 5 August 2014 09:32:00 UTC