From ab3342171fba016b0c5f19b860336ed49a08f3fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 10 Jul 2022 14:56:19 +0200 Subject: 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. --- doc/ref/javascript/formatters.texi | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc/ref/javascript/formatters.texi') 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 void>} formatters @anchor{formatters-proc} -- cgit v1.2.3