Created
June 4, 2013 19:39
-
-
Save anonymous/5708870 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test_apps/template/index.html | 16 ++++++++++++++++ | |
test_apps/template/manifest.webapp | 6 +++++- | |
2 files changed, 21 insertions(+), 1 deletion(-) | |
diff --git a/test_apps/template/index.html b/test_apps/template/index.html | |
index 4611ccd..baca876 100644 | |
--- a/test_apps/template/index.html | |
+++ b/test_apps/template/index.html | |
@@ -16,6 +16,22 @@ | |
</style> | |
<script> | |
+ var mContact = {'givenName': 'Prout'}; | |
+ mContact.tel = [ | |
+ {'value': '+33 6 99 99 99 99'} | |
+ ]; | |
+ | |
+ var contact = new mozContact(); | |
+ contact.init(mContact); | |
+ var saving = navigator.mozContacts.save(contact); | |
+ | |
+ saving.onsuccess = function() { | |
+ console.log( 'yahoo!'); | |
+ }; | |
+ | |
+ saving.onerror = function() { | |
+ console.log( 'boo :('); | |
+ } | |
</script> | |
</head> | |
diff --git a/test_apps/template/manifest.webapp b/test_apps/template/manifest.webapp | |
index 69119ac..958886c 100644 | |
--- a/test_apps/template/manifest.webapp | |
+++ b/test_apps/template/manifest.webapp | |
@@ -55,5 +55,9 @@ | |
"default_locale": "en-US", | |
"icons": { | |
"128": "/style/icons/Blank.png" | |
+ }, | |
+ "type": "certified", | |
+ "permissions": { | |
+ "contacts":{ "access": "readwrite" } | |
} | |
-} | |
\ No newline at end of file | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment