forked from mnater/Hyphenator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest16.html
More file actions
80 lines (79 loc) · 3.11 KB
/
test16.html
File metadata and controls
80 lines (79 loc) · 3.11 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="de">
<head>
<title>Hyphenator.js – Test 16</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
body {
width:50%;
margin-left:25%;
margin-right:25%;
}
#test {
background-color: #ffd6d6;
}
#ref {
background-color: #d6ffd6;
}
</style>
<script src="files/jslint.js" type="text/javascript"></script>
<script type="text/javascript">
function loadScript() {
var xhr = null;
if (typeof XMLHttpRequest !== 'undefined') {
xhr = new XMLHttpRequest();
}
if (!xhr) {
try {
xhr = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
xhr = null;
}
}
if (xhr) {
xhr.open('GET', "../Hyphenator.js", false);
xhr.setRequestHeader('Cache-Control', 'no-cache');
xhr.send(null);
return xhr.responseText;
}
}
</script>
</head>
<body>
<p><a href="index.html"><<- index</a> | <a href="test15.html"><- Prev</a> | <a href="test17.html">Next -></a></p>
<h1>Test 16</h1>
<p id="desc">Check Hyphenator with <a href="http://www.jslint.com/">JSLint</a>!</p>
<pre><script type="text/javascript">
var jsl = jslint(loadScript());
if (jsl.ok) {
if (window != parent) {
var msg = {
desc: "Make JSLint " + jsl.edition + " happy ;-)",
index: 16,
result: 'passed'
};
parent.postMessage(JSON.stringify(msg), window.location.href);
} else {
document.writeln("Hyphenator.js has JSLint " + jsl.edition + " check passed." );
}
} else {
if (window != parent) {
var msg = {
desc: "Make JSLint " + jsl.edition + " happy ;-)",
index: 16,
result: 'failed'
};
parent.postMessage(JSON.stringify(msg), window.location.href);
} else {
var errorCount = jsl.warnings.length;
document.writeln("JSLint " + jsl.edition + " error(s):\n");
for (i = 0; i < errorCount; i++ ) {
document.writeln("\n" + jsl.warnings[i].message + "\n");
document.writeln(" Problem at line " + jsl.warnings[i].line + " column " + jsl.warnings[i].column + ": " + jsl.warnings[i].code);
}
}
}
</script></pre>
</body>
</html>