aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-07-10 14:56:19 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-07-10 16:46:10 +0200
commitab3342171fba016b0c5f19b860336ed49a08f3fb (patch)
tree8a1d6c72fccca64da68ae74eaf046e91d227ce8d /doc
parentAdd srfi-64 util. (diff)
downloadcalp-ab3342171fba016b0c5f19b860336ed49a08f3fb.tar.gz
calp-ab3342171fba016b0c5f19b860336ed49a08f3fb.tar.xz
Change JS formatters interface.
Now the application of formatters are centralized. It also allowed me to easily suround stuff in try-catch, since I otherwise had problems with formatters failing, and nothing showing up.
Diffstat (limited to 'doc')
-rw-r--r--doc/ref/javascript/formatters.texi6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/ref/javascript/formatters.texi b/doc/ref/javascript/formatters.texi
index 71394b39..a3086aa9 100644
--- a/doc/ref/javascript/formatters.texi
+++ b/doc/ref/javascript/formatters.texi
@@ -4,6 +4,12 @@
Formatting procedures used by some components.
@c TODO can we have a backref of every node containing @ref{formatters-proc}?
+@deftypefun void format(targetElement:HTMLElement, data:VEvent, key:string)
+Checks if a specific formatter exists for the given key, and executes
+it.
+Defaults to 'default', and also runs that if the regular formatter throws.
+@end deftypefun
+
@deftypevar {Map<string, (e:HTMLElement, d:VEvent, s:any) => void>} formatters
@anchor{formatters-proc}