Even though this is becoming less and less of a problem, some devices or browsers may still not support WebGL. The following method allows you to check if it is supported and display a message to the user if it is not.
Add [link:https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js] to your javascript and run the following before attempting to render anything.
if (Detector.webgl) {
init();
animate();
} else {
var warning = Detector.getWebGLErrorMessage();
document.getElementById('container').appendChild(warning);
}