-
Notifications
You must be signed in to change notification settings - Fork 4
/
tests.html
46 lines (46 loc) · 1.15 KB
/
tests.html
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Tests</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<h1>Low Level Tests</h1>
<p>
Low level tests.
</p>
<div class="traversal-test">
<p>
Test
<b>Hierachy</b>
<i>for</i>
Node
<hr>
How well
<blockquote>
does
<b>it</b>
</blockquote>
<blockquote>
<b>work</b>
?
</blockquote>
</p>
</div>
<script src="lib/jquery-2.1.4.js"></script>
<script src="edx-shared.js"></script>
<script src="edx-selectable.js"></script>
<script src="edx-editable.js"></script>
<ul>
</ul>
<script> /* TESTS */
console.clear();
var dom = $('.traversal-test').clone().detach(),
node = dom.firstLeafNode();
while( node = node.nextLeafNode(dom, function(node){ return !!node.text().trim(); }) ){
$('ul').append('<li>"' + node[0].data + '"</li>');
}
</script>
</body>
</html>