- From: Josh Soref <jsoref@rim.com>
- Date: Wed, 31 Aug 2011 11:04:41 -0400
- To: Wonsuk Lee <wonsuk11.lee@samsung.com>, "public-device-apis@w3.org" <public-device-apis@w3.org>
Wongsuk wrote: > var featureID = "contacts"; > function doSomeThing() { > // Getting the permission level of a feature > var response = navigator.permissionLevel(featureID); > > if (response === 2) { // USER_ALLOWED = 2 > // Do something with USER_ALLOWED permission > getContacts(); // Perform an contacts search This should be either `a contact` or `a contacts` (certainly not `an`) > ... > } Please note that you should have braces for the else block: > else > // Do something with USER_DENIED permission > alert("This web app will be working except your "+featureID+" information"); s/your/there will be no integration to retrieve/ > } > navigator.requestPermission(featureID, doSomeThing); Note that this message is not an endorsement of the feature... --------------------------------------------------------------------- This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
Received on Wednesday, 31 August 2011 15:05:15 UTC