What does this mean in practice? Well, I tried a few tests with this quick script I whipped up (the use of Dojo was optional, of course, but I just love using it as a framework):
The test fails in Chromium 7.0.517.44 and Firefox 3.6.2. However, in the latest Firefox 4 beta 8, it passes – and Firebug very clearly shows the error that’s thrown:
This is great news, and means that you’ll soon be able to start using this pragma as it finds its way into the latest browsers. It’s probably unwise to start including it now – unless you plan to test all your code on a browser that supports it – because of the risk of undetected side effects (for example, a mis-typed variable that also happens to be dead code). But when, for example, Firefox 4 is released, it will hopefully become a standard best practice for web development.