| <script type="text/javascript"> |
| // Demonstrates how to get the size of the screen diagonal. |
| function log_info(message) { |
| document.getElementById('info').innerHTML += message + '.\n'; |
| function log_error(message) { |
| console.log('Error: ' + message); |
| document.getElementById('error').innerHTML += message + '.\n'; |
| function PrintScreenDiagonal() { |
| if (window.H5vccScreen && window.H5vccScreen.GetDiagonal) { |
| log_info("Screen Diagonal: " + H5vccScreen.GetDiagonal() + " inches."); |
| log_error("Screen Diagonal not available"); |
| window.setInterval(PrintScreenDiagonal, 500); |
| <span id='error' style='white-space: pre; background-color:#FF0000'></span> |
| <span id='info' style='white-space: pre; background-color:#00FF00'></span> |