Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html ng-app="myApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.min.js"></script>
<meta name="description" content="Test JS Bin" />
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<div ng-controller="MainCtrl">
@eCosinus
eCosinus / Contact.js
Last active May 20, 2019 17:46
FirefoxOS WebActivities Examples
var addContact = document.querySelector("#add-contact");
if (addContact) {
addContact.onclick = function () {
var newContact = new MozActivity({
name: "new", // Possibly add-contact in future versions
data: {
type: "webcontacts/contact",
params: { // Will possibly move to be direct properties under "data"
givenName: "Robert",
lastName: "Nyman",