-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
215 lines (184 loc) · 7.95 KB
/
index.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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<!DOCTYPE html>
<html lang="en">
<head>
<title>HTML5test - How well does your browser support HTML5?</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=EDGE">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./css/main.css" type="text/css">
<script src='./scripts/base.js' type='text/javascript'></script>
<script src='./scripts/9/engine.js' type='text/javascript'></script>
<script src='./scripts/9/data.js' type='text/javascript'></script>
<meta name="application-name" content="HTML5test"/>
<link rel="icon" type="image/png" href="./images/icons/favicon-32x32.png">
<meta name="msapplication-TileColor" content="#0092bf">
<meta name="msapplication-TileImage" content="/images/icons/mstile-144x144.png">
<meta property="og:title" content="The HTML5 test - How well does your browser support HTML5?">
<meta property="og:description" content="The HTML5 test score is an indication of how well your browser supports the upcoming HTML5 standard and related specifications. How well does your browser support HTML5?">
<meta property="og:type" content="website">
<meta property="og:url" content="https://html5test.co/">
<meta property="og:image" content="https://html5test.co/images/thumbnail.jpg">
<meta property="og:site_name" content="HTML5test.co">
</head>
<!--
Copyright © 2010-2024 Niels Leenheer, Jerzy Głowacki
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<body>
<div id='contentwrapper'>
<div class='page'>
<div id='loading'><div></div></div>
<div id='warning'></div>
<div id='contents' class='column' style='visibility: hidden;'>
<div id='score'></div>
<div id='results'></div>
<div class='paper'>
<div>
<h2>About HTML5test</h2>
<div class='text'>
<span id='html5'></span>
<p>
The HTML5 test score is an indication of how well your browser supports the
HTML5 standard and related specifications. Find out which parts of HTML5 are
supported by your browser today and compare the results with other browsers.
</p>
<p>
The HTML5 test does not try to test all of the new features offered by HTML5, nor does it try to test the functionality of each feature it does detect.
Despite these shortcomings we hope that by quantifying the level of support users and web developers will get an idea of how hard the
browser manufacturers work on improving their browsers and the web as a development platform.
</p>
<p>
The score is calculated by testing for the many new features of HTML5. Each feature is worth one or more points. Apart from the main HTML5
specification and other specifications created the W3C HTML Working Group or WHATWG, this test also awards points for supporting related drafts and
specifications.
</p>
<p>
Please be aware that although the HTML5 specification is now an official recommendation, other specifications that are being tested are still in development
and could change before receiving an official status.
In the future new tests will be added for new specifications and existing tests will be updated when the specifications change.
</p>
<h3>Help us improve HTML5 test by donating</h3>
<p>
This will allow us to spend more time on HTML5test.com and acquire more devices for our testing lab.
</p>
</div>
</div>
<div class='buttons'>
<abbr class='button developed' title="Github"><span>https://github.com/niutech/html5test</span></abbr>
</div>
</div>
<div class='footer'>
<div>
<div class='copyright'>
<p>
© 2024 - Created by Niels Leenheer, modified by Jerzy Głowacki.<br>
Please note that the HTML5 test is not affiliated with the W3C or the HTML5 working group.<br>
HTML5 Logo by <abbr title="World Wide Web Consortium">W3C</abbr>.
Browser detection by <abbr title='http://whichbrowser.net'>WhichBrowser</abbr>.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id='index'></div>
<script>
var scoreMsg
var scorePort
window.addEventListener("message", (event) => {
console.log("okk", event)
if(event.data === "score-channel"){
scorePort = event.ports[0];
if (scoreMsg) {
scorePort.postMessage(scoreMsg)
}
}
});
loadWhichBrowser(function(WhichBrowser) {
Browsers = new WhichBrowser({
useFeatures: true,
detectCamouflage: true
});
new Test(function(r) {
var m = new Metadata(tests);
var c = new Calculate(r, m.data);
showResults(r, c, m);
}, showError);
});
function showResults(r, c, m) {
/* Update total score */
var container = document.getElementById('score');
scoreMsg = `${c.score}/${c.maximum}`
if (scorePort) {
scorePort.postMessage(scoreMsg)
}
container.innerHTML =
"<div class='pointsPanel'>" +
"<h2><span>Your browser scores</span> <strong>" + c.score + "</strong> <span>out of " + c.maximum + " points</span></h2>" +
"</div>";
/* Show box for confirming useragent detection */
new Confirm(container, {
id: r.uniqueid,
onConfirm: function() { submit('confirm', '{"uniqueid": "' + r.uniqueid + '"}'); },
onReport: function() { submit('report', '{"uniqueid": "' + r.uniqueid + '"}'); },
onFeedback: function(value) { submit('feedback', JSON.stringify({ uniqueid: r.uniqueid, value: value })); }
});
/* Show detailed report of scores */
var container = document.getElementById('results');
container.innerHTML = '';
var div = document.createElement('div');
div.className = 'resultsTable detailsTable';
container.appendChild(div);
var table = new ResultsTable({
parent: div,
tests: m.data,
header: false,
links: true,
explainations: true,
grading: true,
bonus: true,
distribute: true,
columns: 1
});
table.updateColumn(0, { points: c.points, maximum: c.maximum, score: c.score, results: r.results });
new Index({
tests: tests,
index: document.getElementById('index'),
wrapper: document.getElementById('contentwrapper')
});
window.setTimeout(function() {
var contents = document.getElementById('contents');
contents.style.visibility = 'visible';
var loading = document.getElementById('loading');
loading.style.display = 'none';
}, 100);
}
function showError(e) {
if (typeof console != 'undefined') console.log(e);
alert('Test has failed: ' + e.message);
var contents = document.getElementById('contents');
contents.style.visibility = 'visible';
var loading = document.getElementById('loading');
loading.style.display = 'none';
}
</script>
</body>
</html>