Skip to content

Commit

Permalink
generate rel="icon" as well as "apple-touch-icon"
Browse files Browse the repository at this point in the history
  • Loading branch information
samthor committed Jul 13, 2016
1 parent 5dbb556 commit a48a03a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 5 additions & 1 deletion pwacompat.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,14 @@
});
icons.forEach(icon => {
const iconEl = document.createElement('link');
iconEl.setAttribute('rel', 'apple-touch-icon');
iconEl.setAttribute('rel', 'icon');
iconEl.setAttribute('href', icon.src);
iconEl.setAttribute('sizes', icon.sizes);
document.head.appendChild(iconEl);

const appleIconEl = iconEl.cloneNode(true);
appleIconEl.setAttribute('rel', 'apple-touch-icon');
document.head.appendChild(appleIconEl);
});

// If this is a standalone iOS ATHS app, perform setup actions.
Expand Down
5 changes: 3 additions & 2 deletions pwacompat.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a48a03a

Please sign in to comment.