WebScript seems like it would really work. Especially if it was introduced at the same time as a major update to the ECMAscript spec