File: test.html

package info (click to toggle)
node-doctrine 3.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 380 kB
  • sloc: javascript: 5,097; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 880 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Doctrine trying</title>
<script src="../doctrine.js"></script>
<script type="text/javascript">
	window.onload = function() {
		document.getElementById("doit").onclick = function() {
			var res = doctrine.parseParamType(document.getElementById("commenttext").value,
				{unwrap:true, recoverable:true} );
				
			document.getElementById("parse_tree_res").innerHTML = JSON.stringify(res, null, ' ');
			document.getElementById("stringify_res").textContent = doctrine.stringify(res);
		};
	};
</script>
</head>
<body>
	<textarea id="commenttext">Add a jsdoc comment here</textarea>
	<br/>
	<br/>
	<button id="doit">Click to parse</button>
	<br/>
	<br/>
	<h3>Parse Tree</h3>
	<pre id="parse_tree_res" ></pre>
	<h3>Stringified</h3>
	<pre id="stringify_res" ></pre>
</body>
</html>