Use strict mode, add jshintrc and enforce jshint
Define onerror callback if not specified
Merge pull request #67 from Rob--W/master

Define missing onerror callback