mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-10 10:23:40 +01:00
fix (ipad): ipad 14 issue
This commit is contained in:
parent
4efdeb9c97
commit
233f9c12fe
3 changed files with 22 additions and 2 deletions
|
|
@ -15,6 +15,7 @@ export default async function main() {
|
|||
// setup_sw(), // TODO
|
||||
setup_blue_death_screen(),
|
||||
setup_history(),
|
||||
setup_polyfill(),
|
||||
]);
|
||||
|
||||
await Promise.all([ // procedure with dependency on config
|
||||
|
|
@ -117,3 +118,9 @@ async function setup_history() {
|
|||
async function setup_title() {
|
||||
document.title = window.CONFIG.name || "Filestash";
|
||||
}
|
||||
|
||||
async function setup_polyfill() {
|
||||
if (!("replaceChildren" in document.body)) {
|
||||
await loadJS(import.meta.url, "../lib/polyfill.js");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,16 @@ import { animate, slideYIn } from "../lib/animate.js";
|
|||
import assert from "../lib/assert.js";
|
||||
import { loadCSS } from "../helpers/loader.js";
|
||||
|
||||
await loadCSS(import.meta.url, "./dropdown.css");
|
||||
|
||||
export default class ComponentDropdown extends HTMLDivElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.render();
|
||||
}
|
||||
|
||||
async connectedCallback() {
|
||||
await loadCSS(import.meta.url, "./dropdown.css");
|
||||
}
|
||||
|
||||
static get observedAttributes() {
|
||||
return ["options"];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
Document.prototype.replaceChildren ||= replaceChildren;
|
||||
DocumentFragment.prototype.replaceChildren ||= replaceChildren;
|
||||
Element.prototype.replaceChildren ||= replaceChildren;
|
||||
|
||||
function replaceChildren(...new_children) {
|
||||
const { childNodes } = this;
|
||||
while (childNodes.length) {
|
||||
childNodes[0].remove();
|
||||
}
|
||||
this.append(...new_children);
|
||||
}
|
||||
Loading…
Reference in a new issue