ECMAScript 5 has a strict mode which will allow us to put third party code on a page and be confident that that third party code cannot do all the bad things that happen in cross site scripting attacks. 