aboutsummaryrefslogtreecommitdiff
path: root/static/server_connect.ts
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-06-13 12:09:16 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-06-13 12:09:16 +0200
commit9d4ce0b515fd71dc38fb24db77be9572ebf0df64 (patch)
tree3d0b005c4ab79577fe4847210e78a54f310dbebf /static/server_connect.ts
parentCleanup of zic. (diff)
parentReplace some .tagName with instanceof. (diff)
downloadcalp-9d4ce0b515fd71dc38fb24db77be9572ebf0df64.tar.gz
calp-9d4ce0b515fd71dc38fb24db77be9572ebf0df64.tar.xz
Merge html-validator.
Adds an HTML validator which checks the soundness of our generated document, both before and after javascript is ran (thanks to selenium). This merge also fixes the initial problems, meaning that the HTML should validate as of this commit.
Diffstat (limited to 'static/server_connect.ts')
-rw-r--r--static/server_connect.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/static/server_connect.ts b/static/server_connect.ts
index 61eb4f30..d1a544eb 100644
--- a/static/server_connect.ts
+++ b/static/server_connect.ts
@@ -4,6 +4,7 @@ import { jcal_to_xcal } from './jcal'
import { VEvent } from './vevent'
import { uid } from './types'
import { vcal_objects } from './globals'
+import { PopupElement } from './components/popup-element'
async function remove_event(uid: uid) {
let element = vcal_objects.get(uid);
@@ -124,7 +125,7 @@ async function create_event(event: VEvent) {
for (let r of event.registered) {
r.classList.remove('generated');
- if (r.tagName.toLowerCase() === 'popup-element') {
+ if (r instanceof PopupElement) {
console.log(r);
r.removeAttribute('visible');
}