safari fixes: update to latest wabac.js (fix bug with cacheing responses to safari's 0-1 range check)

fix spinner in safari by adding keyframes to document itself
This commit is contained in:
Ilya Kreymer
2020-09-10 23:17:26 -07:00
parent 1790a1a73e
commit 7d9ce2b952
5 changed files with 30 additions and 10 deletions
+20
View File
@@ -26,6 +26,8 @@ class App extends LitElement
registerSW(__SW_NAME__);
initDBWorker();
this.safariKeyframes();
}
static get properties() {
@@ -374,6 +376,24 @@ class App extends LitElement
window.location.search = this.pageParams.toString();
}
}
safariKeyframes() {
// Safari requires keyframes at the document level, add spinner keyframes here
const css = `
@keyframes spinAround {
from {
transform: rotate(0deg);
}
to {
transform: rotate(359deg);
}
}
`;
const style = document.createElement("style");
document.head.appendChild(style);
style.appendChild(document.createTextNode(css));
}
}
customElements.define("replay-app-main", App);