3 <title>DeviceLight test
</title>
4 <script type=
"text/javascript">
5 function checkLightEvent(event
) {
6 return event
.value
>= 0;
9 function onLight(event
) {
10 if (checkLightEvent(event
)) {
11 window
.removeEventListener('devicelight', onLight
);
19 document
.getElementById('status').innerHTML
= 'PASS';
20 document
.location
= '#pass';
24 document
.location
= '#fail';
28 <body onLoad=
"window.addEventListener('devicelight', onLight)">
29 <div id=
"status">FAIL
</div>