Another solution that can be is making a browser (like Chrome, Firefox) etc., which exactly follows the specifications of these language. The BOM methods and properties can be discussed in another Meta post.
I admit that all the solutions above will be very hard to implement and most probably will never get implemented (I added them just for the sake of some probability that still turns in favor of them being implemented). So, on the very least, we can define a browser (such as Chrome v58.0.3029, Firefox v53.0a1 etc.) as the standard. In other words, we can examine the validity of a solution by only running it in a browser that we can agree upon in another Meta post.
So, what do you think about these suggestion? Should any one of these be implemented? If yes, then which? If not, then why not? Please post your ideas as answers. Consider adding a comment when you downvote.