Contacts API: Using cleaner IDs for the mozContact objects

RESOLVED FIXED in mozilla14

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: etienne, Assigned: gwagner)

Tracking

unspecified
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
The ID generated for each mozContact currently looks like

{25c00f01-90e5-c545-b4d4-21E2ddbab9e0}

For various reason devs might want to these IDs to construct dom #id like
prefix_[contactID]

So if it doesn't have any bad side effect it would be great to stripe the "{", "}" and "-" from the mozContact IDs.

This way preventing the need for each mozContacts API user to 
stripe them himself. And facilitating the search by ID.
(Assignee)

Updated

6 years ago
Assignee: nobody → anygregor
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 1

6 years ago
Created attachment 606333 [details] [diff] [review]
patch
(Assignee)

Comment 2

6 years ago
Comment on attachment 606333 [details] [diff] [review]
patch

We could also change it in _getRandomId() if this is a general problem
Attachment #606333 - Flags: review?(fabrice)
Attachment #606333 - Flags: review?(fabrice) → review+
(Assignee)

Comment 3

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ac5f18c521e6
https://hg.mozilla.org/mozilla-central/rev/ac5f18c521e6
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.