aboutsummaryrefslogtreecommitdiff
path: root/notif/example.html
diff options
context:
space:
mode:
Diffstat (limited to 'notif/example.html')
-rw-r--r--notif/example.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/notif/example.html b/notif/example.html
new file mode 100644
index 0000000..681a951
--- /dev/null
+++ b/notif/example.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="UTF-8" />
+ <title>WUI - notif</title>
+ <style>
+ .test-1 {
+ width: 80%;
+ height: 4em;
+ border: 2px solid salmon;
+ background-color: lightsalmon;
+ margin-bottom: 1em;
+ }
+ .test-2 {
+ width: 80%;
+ height: 4em;
+ border: 2px solid silver;
+ background-color: honeydew;
+ margin-bottom: 1em;
+ }
+ </style>
+ </head>
+ <body onload="main()">
+ <input id="notif.msg"></input>
+ <button onclick="notifInfo()">Info</button>
+ <button onclick="notifError()">Error</button>
+
+ <br/>
+ <br/>
+ <div class="test-1"></div>
+ <div class="test-2"></div>
+ <script>
+ var exports = {}
+ let inputMsg = document.getElementById("notif.msg")
+ let wuiNotif = null
+ </script>
+ <script src="notif.js"></script>
+ <script>
+ function main() {
+ wuiNotif = new WuiNotif()
+ inputMsg.value = `test <b>bold</b>`
+ }
+ function notifInfo() {
+ wuiNotif.Info(inputMsg.value)
+ }
+ function notifError() {
+ wuiNotif.Error(inputMsg.value)
+ }
+ </script>
+ </body>
+</html>