Commit | Line | Data |
---|---|---|
69397a71 DV |
1 | <!doctype html> |
2 | <html> | |
3 | <head> | |
fd6b8dad | 4 | <link rel="stylesheet" href="../dist/dygraph.css"> |
69397a71 | 5 | <title>Exported Symbols test</title> |
69397a71 DV |
6 | </head> |
7 | <body> | |
8 | <p>dygraphs exports these symbols into the global namespace:</p> | |
9 | <ol id="list"> | |
10 | </ol> | |
11 | ||
12 | <p>It exports these symbols inside each of those symbols:</p> | |
13 | <ol id="list2"> | |
14 | </ol> | |
15 | ||
16 | <script type="text/javascript"> | |
17 | var windowProps = {}; | |
18 | var newProps = []; | |
19 | var k, i, html, level2props, sym, topSymbol; | |
20 | for (k in window) { | |
21 | windowProps[k] = true; | |
22 | } | |
23 | </script> | |
fbd6834a | 24 | <script type="text/javascript" src="../dist/dygraph.js"></script> |
69397a71 DV |
25 | <script type="text/javascript"> |
26 | for (k in window) { | |
27 | if (!windowProps.hasOwnProperty(k)) { | |
28 | newProps.push(k); | |
29 | } | |
30 | } | |
31 | newProps.sort(); | |
32 | html = ''; | |
33 | for (i = 0; i < newProps.length; i++) { | |
34 | html += '<li>' + newProps[i] + '</li>\n'; | |
35 | } | |
36 | document.getElementById('list').innerHTML = html; | |
37 | ||
38 | level2props = []; | |
39 | for (i = 0; i < newProps.length; i++) { | |
40 | topSymbol = newProps[i]; | |
41 | for (k in window[topSymbol]) { | |
42 | sym = topSymbol + '.' + k; | |
43 | level2props.push(sym); | |
44 | } | |
45 | } | |
46 | ||
47 | newProps.sort(); | |
48 | html = ''; | |
49 | for (i = 0; i < level2props.length; i++) { | |
50 | html += '<li>' + level2props[i] + '</li>\n'; | |
51 | } | |
52 | document.getElementById('list2').innerHTML = html; | |
53 | </script> | |
54 | </body> | |
55 | </html> |