bunch o' tresh
This commit is contained in:
parent
e43d612e3d
commit
06d99bf556
9 changed files with 80 additions and 13 deletions
21
static/js/thanks-webkit.js
Normal file
21
static/js/thanks-webkit.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Detect if we can have crucial functionality (ie. custom elements call constructors).
|
||||
// This doesn't seem to happen in Epiphany, and possibly also other Webkit-based browsers.
|
||||
let works = false;
|
||||
class WebkitMoment extends HTMLLIElement {
|
||||
constructor() {
|
||||
super();
|
||||
works = true;
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("th-webkit-moment", WebkitMoment, { extends: "li" });
|
||||
|
||||
let willItWorkOrWillItNot = document.createElement("div");
|
||||
willItWorkOrWillItNot.innerHTML = `<li is="th-webkit-moment"></li>`;
|
||||
|
||||
// If my takeoff fails
|
||||
// tell my mother I'm sorry
|
||||
let box = document.getElementById("webkit-makes-me-go-insane");
|
||||
if (!works) {
|
||||
box.style = "display: block";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue