Skip to content

Commit

Permalink
golf: skip setAttribute & assign directly;
Browse files Browse the repository at this point in the history
- 748 gz / 612 br
  • Loading branch information
lukeed committed Dec 11, 2018
1 parent 53b7d15 commit f7cb14e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prefetch.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ function linkPrefetchStrategy(url) {
}

const link = document.createElement(`link`);
link.setAttribute(`rel`, `prefetch`);
link.setAttribute(`href`, url);
link.rel = `prefetch`;
link.href = url;

link.onload = resolve;
link.onerror = reject;
Expand Down

0 comments on commit f7cb14e

Please # to comment.