mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 06:48:11 +08:00
Fix broken BigInt64Array unsupported message on old Safari
This commit is contained in:
@@ -4,11 +4,30 @@
|
||||
import "reflect-metadata";
|
||||
import { createApp } from "vue";
|
||||
|
||||
import { stripIndents } from "@/utility-functions/strip-indents";
|
||||
import { initWasm } from "@/wasm-communication/editor";
|
||||
|
||||
import App from "@/App.vue";
|
||||
|
||||
(async (): Promise<void> => {
|
||||
if (!("BigUint64Array" in window)) {
|
||||
const body = document.body;
|
||||
const message = stripIndents`
|
||||
<style>
|
||||
h2, p, a {
|
||||
text-align: center;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
<h2>This browser is too old</h2>
|
||||
<p>Please upgrade to a modern web browser such as the latest Firefox, Chrome, Edge, or Safari version 15 or later.</p>
|
||||
<p>(The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt64Array#browser_compatibility" target="_blank"><code>BigInt64Array</code></a>
|
||||
JavaScript API must be supported by the browser for Graphite to function.)</p>
|
||||
`;
|
||||
body.innerHTML = message + body.innerHTML;
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize the WASM module for the editor backend
|
||||
await initWasm();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user