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