aboutsummaryrefslogtreecommitdiff
path: root/static/formatters.ts
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-03-15 01:36:07 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-03-15 02:25:27 +0100
commitbb7b8ee00bd2c7d26e82c2eb4a0571023e821d9f (patch)
treeb142e1dc98835237d679ab83029f5c1371453113 /static/formatters.ts
parentIntroduce concept of VEvent formatters in frontend. (diff)
downloadcalp-bb7b8ee00bd2c7d26e82c2eb4a0571023e821d9f.tar.gz
calp-bb7b8ee00bd2c7d26e82c2eb4a0571023e821d9f.tar.xz
Introduce user-additions in frontend.
Along with an initial example of their use.
Diffstat (limited to 'static/formatters.ts')
-rw-r--r--static/formatters.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/static/formatters.ts b/static/formatters.ts
index 38c71e5e..828a0e8b 100644
--- a/static/formatters.ts
+++ b/static/formatters.ts
@@ -4,6 +4,12 @@ export {
import { makeElement } from './lib'
+declare global {
+ interface Window {
+ formatters : Map<string, (e : HTMLElement, s : any) => void>;
+ }
+}
+
let formatters : Map<string, (e : HTMLElement, s : any) => void>;
formatters = window.formatters = new Map();