May be the solution is simple but i'm blind sometimes ;-)
if I press [F12] i get the console an this message:
SyntaxError: unexpected token: '{' ReferenceError: main is not defined
Joshy
Code: Select all
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8' />
<title>JS and HTML5 canvas template!</title>
<!-- comment in HTML -->
<style>
html, body {
padding: 0;
margin: 0;
overflow: hidden;
}
</style>
</head>
<body onload='main()'>
<noscript>Your browser does not support JavaScript or is disabled !</noscript>
<canvas id='renderer'>Please use a browser that supports a HTML5 'canvas' tag !</canvas>
<!-- block comment in HTML
<script src='./my_relative_path/my_include_file.js'></script>
-->
<script>
// single line comment in JS
main() {
/*
block
comment
in JS
*/
}
</script>
</body>
</html>