This is by ECMA (javascript) specifications. If you do not declare the variable using the dim keyword then the variable will be created as a top level (aka global) variable the first time it is used.
David -----Original Message----- From: dev-tech-js-engine-rhino-bounces+davidparks21=yahoo....@lists.mozilla.org [mailto:dev-tech-js-engine-rhino-bounces+davidparks21=yahoo....@lists.mozill a.org] On Behalf Of migou Sent: Saturday, February 21, 2009 4:21 AM To: [email protected] Subject: script evaluation and no exception raised. Rhino 1.7R1 If I execute the following script: <script>y = 5;</script> I was expecting to have an exception telling me that y is not declared. But in my case, it seems that rhino auto declare it. Any suggestion how to control it ? Thanks _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino _______________________________________________ dev-tech-js-engine-rhino mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
