From 347e83f7f6abe35fd1ea3515f55635a2b1a18fcd Mon Sep 17 00:00:00 2001 From: lucaspalomodevelop Date: Mon, 31 Oct 2022 18:05:31 +0100 Subject: [PATCH] add StateFunction to README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index c0992ac..41384f8 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,17 @@ let result = Jsste.render(pagecode, templatecode); - `_TEMPLATE_` -> Defines the path to the temp file - `_STYLES_` -> Defines a list of CSS files that will be implemented +### Include States + +You can include an Callbackfunction that will be called when the state is change + +```javascript +jsste.setStateFunction(({ status, statusMSG }) => { + yourstatus = status; + yourstatusMSG = statusMSG; +}); +``` + ### States-Codes | Code | Meaning |