forked from Modernizr/Modernizr
-
Notifications
You must be signed in to change notification settings - Fork 1
/
output.html
112 lines (84 loc) · 2.57 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
<!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: 14px/18px Inconsolata, Consolas, monospace;
}
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>
<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>');
}
}
})();
</script>
</ol>
<script>
document.write('HTML element className = ' + document.documentElement.className);
</script>
<br>
<a href="./test/index.html">View Test Suite</a> <input type="range">
</body>
</html>