From 588d1a6b8727920919c9848471abdf21891a0c5f Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Tue, 30 Jul 2019 18:01:16 +0000 Subject: [PATCH] Tweaked HTML application to add warning message if scripts aren't loaded. --- typescript-javascript/qrcodegen-demo.ts | 2 ++ typescript-javascript/qrcodegen-js-demo.html | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/typescript-javascript/qrcodegen-demo.ts b/typescript-javascript/qrcodegen-demo.ts index 64d468a..fef368e 100644 --- a/typescript-javascript/qrcodegen-demo.ts +++ b/typescript-javascript/qrcodegen-demo.ts @@ -27,6 +27,8 @@ namespace app { function initialize(): void { + (document.getElementById("loading") as HTMLElement).style.display = "none"; + (document.getElementById("loaded") as HTMLElement).style.removeProperty("display"); let elems = document.querySelectorAll("input[type=number], textarea"); for (let el of elems) { if (el.id.indexOf("version-") != 0) diff --git a/typescript-javascript/qrcodegen-js-demo.html b/typescript-javascript/qrcodegen-js-demo.html index afaa90f..ff8ecf7 100644 --- a/typescript-javascript/qrcodegen-js-demo.html +++ b/typescript-javascript/qrcodegen-js-demo.html @@ -51,7 +51,12 @@

QR Code generator demo library (JavaScript)

-
+
+

Loading application...

+

(Are the JavaScript files missing?)

+

(The JavaScript code needs to be compiled from the TypeScript code.)

+
+