forked from Modernizr/Modernizr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
output.html
147 lines (108 loc) · 3.53 KB
/
output.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
<!DOCTYPE html>
<html lang="en" dir="ltr" class="no-js">
<head>
<!-- <meta http-equiv="X-UA-Compatible" content="IE=7" > -->
<title>Modernizr Test Suite</title>
<style media="screen">
body {
font: 16px/20px Inconsolata, Consolas, monospace;
-moz-column-count: 2; -webkit-column-count: 2; column-count: 2;
}
li {
color: #900;
}
li.yes {
color: #090;
}
li b {
color: #000;
}
</style>
<script>
// window.localStorage && document.write('localStorage.getItem("modernizr1.2") is: ' + (!!localStorage.getItem('modernizr1.2') ? 'PRESENT' : 'EMPTY') + '<br>');
var start = +new Date();
</script>
<!--
<script src="http://code.jquery.com/jquery-nightly.js"></script>
-->
<script src="modernizr.js"></script>
</head>
<body id="home">
<script>
// callback for the fontface detect
window.Modernizr && Modernizr._fontfaceready && Modernizr._fontfaceready(function(bool){
var elem = document.getElementById('fontface');
if (!elem) return;
elem.className = (bool ? 'yes' : '');
elem.innerHTML = 'fontface :' + Modernizr['fontface'];
elem.style.fontWeight = 'bold';
});
document.write(/*'At '+ (+new Date()) + */' Modernizr took: '+ ((+new Date()) - start) + 'ms');
/*
Modernizr.addTest('datauri',function(){
var data = new Image();
var is1px = function(){
return data.width == 1 && data.height == 1;
}
data.onload = data.onerror = function(){
Modernizr.datauri = is1px();
}
data.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
Modernizr.datauri = is1px();
});
*/
</script>
<h1>Modernizr</h1>
<a href="./test/index.html">View Test Suite</a>
<ol >
<script>
(function(){
if (!window.Modernizr) {
document.write('Modernizr object not created.');
return;
}
// window.localStorage && document.write('localStorage.getItem(modernizr'+Modernizr._version+') == ' + localStorage.getItem('modernizr'+Modernizr._version) + '<br>');
for (var prop in Modernizr) {
if (typeof Modernizr[prop] === 'function') continue;
if (prop == 'inputtypes' || prop == 'input') {
document.write('<li><b>'+prop+'{}</b><ul>');
for (var field in Modernizr[prop]) {
document.write('<li class="' + (Modernizr[prop][field] ? 'yes' : '') + '">' + field + ': ' + Modernizr[prop][field] + '</li>');
}
document.write('</ul></li>');
} else {
document.write('<li id="'+prop+'" class="' + (Modernizr[prop] ? 'yes' : '') + '">' + prop + ': ' + Modernizr[prop] + '</li>');
}
}
})();
function _bBeaconComplete(data){
window.console && console.log('beaconComplete',data);
}
window._bTestResults = {};
for (var feat in Modernizr) {
if (/^_/.test(feat)) continue;
if (/input|video|audio/.test(feat) && Modernizr[feat]){
for (var thing in Modernizr[feat]){
_bTestResults[feat + ':' +thing] = Modernizr[feat][thing] ? '1' : '0';
}
} else {
_bTestResults[feat] = Modernizr[feat] ? '1' : '0';
}
}
// Beacon the results to Browserscope.
(function() {
var _bTestKey = 'agt1YS1wcm9maWxlcnINCxIEVGVzdBjg8PMBDA';
var _bScript = document.createElement('script');
_bScript.src = 'http://www.browserscope.org/user/beacon/' + _bTestKey + '?callback=_bBeaconComplete';
_bScript.setAttribute('async', 'true');
var scripts = document.getElementsByTagName('script');
var lastScript = scripts[scripts.length - 1];
lastScript.parentNode.insertBefore(_bScript, lastScript);
})();
</script>
</ol>
<script>
document.write('<p> HTML element className = ' + document.documentElement.className + '</p>');
</script>
</body>
</html>