Closed Bug 1047187 Opened 10 years ago Closed 10 years ago

Support for non-nullable property in WebIDL Event dictionary

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: allstars.chh, Unassigned)

References

Details

When I tried to implement MozNFCPeerEvent for NFC in Bug 1046554, I'd like to make the 'peer' property non-nullable, however met compilation error in [1], and the reason for why this 'peer' shouldn't be nullable is this event (MozNFCPeerEvent) is fired when another MozNFCPeer is detected, so the 'peer' should be a valid MozNFCPeer object, and shouldn't be null. Also W3C NFC API has defined this NFCPeerEvent with non-nullable 'peer' property, see [2]. After consulting smaug, he said we should file a bug for this. [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1046554#c4 [2]: http://w3c.github.io/nfc/proposals/common/nfc.html#nfcpeerevent-interface
The W3C API as written doesn't seem to me like it would pass TAG review: it has no constructor for the event... Given that we _do_ apparently want to have a constructor, what is its expected behavior when the passed-in dictionary doesn't have a "peer" property?
I meant you should file a spec bug about this, sorry about not being clear about.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.