This was one the of things that I worked on to avoid, when building Pixza (pixza.com) a HTML4/5+JS+Erlang MMO game. I wrote a script to obfuscate all the JS object and member names to random strings before deploying the code.
Very interesting. I guess this is always a risk when writing javascript. good mitigation though.