Skip to content

Commit

Permalink
Update success message in example
Browse files Browse the repository at this point in the history
We now say
"Data was shared successfully"

resolves #62
  • Loading branch information
ericwilligers committed Mar 15, 2018
1 parent 9c37cf9 commit 286c673
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ choosing, just attach this JavaScript code to a "share" button.
```js
shareButton.addEventListener('click', () => {
navigator.share({title: 'Example Page', url: window.location.href})
.then(console.log('Share successful'));
.then(console.log('Data was shared successfully'));
});
```

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h2>
shareButton.addEventListener("click", async () => {
try {
await navigator.share({ title: "Example Page", url: "" });
console.log("Share successful");
console.log("Data was shared successfully");
} catch (err) {
console.error("Share failed:", err.message);
}
Expand Down

0 comments on commit 286c673

Please sign in to comment.