Closed Bug 993946 Opened 10 years ago Closed 10 years ago

B2G NFC: Consistent naming between Nfc or NFC in WebIDL

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(feature-b2g:2.0, tracking-b2g:backlog)

RESOLVED FIXED
2.0 S1 (9may)
feature-b2g 2.0
tracking-b2g backlog

People

(Reporter: allstars.chh, Assigned: allstars.chh)

References

Details

(Whiteboard: [p=1])

Attachments

(1 file, 1 obsolete file)

This is also mentioned by Hsinyi.
In WebIDL, some NFC objects are named with NFC (all letters capitalized), such as MozNFCTag, MozNFCPeer,

However others are using camelCase style, such as MozNfc, MozNfcManager, with only N is capitalized.

I think at least we should have consistent naming in WebIDL.
blocking-b2g: --- → backlog
Assignee: nobody → allstars.chh
Attached patch Patch (obsolete) — Splinter Review
Attachment #8413670 - Flags: superreview?(bugs)
Attachment #8413670 - Flags: review?(dlee)
Comment on attachment 8413670 [details] [diff] [review]
Patch

Please don't copy, but rename. That way hg blame isn't lost.

Don't we still have navigator.mozNfc ? Should we change that too?
Attachment #8413670 - Flags: superreview?(bugs) → superreview-
Attached patch Patch v2.Splinter Review
Attachment #8413670 - Attachment is obsolete: true
Attachment #8413670 - Flags: review?(dlee)
(In reply to Olli Pettay [:smaug] from comment #2)
> Please don't copy, but rename. That way hg blame isn't lost.
> 
Sorry, fix now.

> Don't we still have navigator.mozNfc ? Should we change that too?

mozNfc is the property, and W3C [1] also uses lower case 'nfc', I think it's okay for that.

The things I'd like to fix in this bug is the consistent naming between

 {MozNfc, MozNfcManager} and {MozNFCTag, MozNFCPeer}


[1] : http://w3c.github.io/nfc/proposals/common/nfc.html


thanks
Attachment #8414258 - Flags: superreview?(bugs)
Attachment #8414258 - Flags: review?(dlee)
Attachment #8414258 - Flags: review?(dlee) → review+
Attachment #8414258 - Flags: superreview?(bugs) → superreview+
https://hg.mozilla.org/mozilla-central/rev/3b3f23c1df74
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Hmm...I was wondering why the unit test cases were still working. W3C: navigator.nfc, ours eventually: navigator.Nfc (chopping moz off), currently in WebIDL: mapped to mozNfc, using MozNFC using:

JSImplementation="@mozilla.org/navigatorNfc;1",
NavigatorProperty="mozNfc")

to the definition in nsNfc.js.

What should our future migration plans be, for web content (and the nfc webapps)? (I can open a new bug as necessary).
feature-b2g: --- → 2.0
Flags: in-moztrap-
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.