This is my code:
this.loadMap = function () {
this._map = null;
this._width = 0;
this._height = 0;
this._playerX = 0;
this._playerY = 0;
I had this same issue with Chrome (Version 20.0.1132.57) and using --allow-file-access-from-files didn't work for me (on Ubuntu 12.04).
But, using the command python -m SimpleHTTPServer in the directory that holds the localfiles I'm trying to test with allows me to work around the problem. That command launches an HTTP server that serves the current directory tree at http://localhost:8000/
So, if I have a file test.html that uses an ajax call for a file in the same dir I can use http://localhost:8000/test.html and Chrome will be ok with it. For me, this is fine for local dev/testing.
I came across that command on www.commandlinefu.com.