summaryrefslogtreecommitdiff
path: root/node_modules/yamlparser/tests/index.html
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-08-10 10:38:44 +0200
committerMinteck <contact@minteck.org>2022-08-10 10:38:44 +0200
commitc6dbf0450566c40efc4a26f4f0717452b6ef95cd (patch)
treeb4be2d508223820d0a77d5a3e35e82684da3b6ec /node_modules/yamlparser/tests/index.html
downloadhornchat-c6dbf0450566c40efc4a26f4f0717452b6ef95cd.tar.gz
hornchat-c6dbf0450566c40efc4a26f4f0717452b6ef95cd.tar.bz2
hornchat-c6dbf0450566c40efc4a26f4f0717452b6ef95cd.zip
Initial commitHEADmane
Diffstat (limited to 'node_modules/yamlparser/tests/index.html')
-rw-r--r--node_modules/yamlparser/tests/index.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/node_modules/yamlparser/tests/index.html b/node_modules/yamlparser/tests/index.html
new file mode 100644
index 0000000..450f672
--- /dev/null
+++ b/node_modules/yamlparser/tests/index.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html lang="en-US">
+<head>
+ <meta charset="UTF-8">
+ <title>YAML Parser</title>
+ <script type="text/javascript" src="../src/yamlparser.js"></script>
+ <script type="text/javascript">
+ window.onload = function() {
+ var test1 = YAML.eval("---\n- one\n- two");
+ var test2 = YAML.eval("---\none: two");
+
+ YAML.fromURL("example.yml", function(data) {
+ var errors = YAML.getErrors();
+ if(errors.length == 0)
+ document.getElementById("out").innerHTML = "Done! Took " + YAML.getProcessingTime() + " miliseconds.";
+ else {
+ document.getElementById("out").innerHTML = errors.join("<br>");
+ }
+ });
+ };
+ </script>
+</head>
+<body>
+ <pre id="out"></pre>
+</body>
+</html>