The following, very basic script, fails in Chrome and Safari with this error Cannot call method 'appendChild' of null
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript" src="raphael-min.js">
</script>
<script type="text/javascript">
var paper = Raphael("canvas", 320, 200);
</script>
</head>
<body>
<div id="canvas"></div>
</body>
</html>
I have no idea why – anyone?
You should wrap the call when the DOM is ready.