Looks like they have a bug report on this. I'll have to take it on faith it's a dupe -- the bug report doesn't match exactly -- but someone added my test case to the bug so we should see it fixed.

jim

Begin forwarded message:

From: Bob Clary <[EMAIL PROTECTED]>
Date: May 9, 2006 10:04:35 AM PDT
Subject: Re: 'arguments' within 'with (this) { ... }' behavior change in mozilla nightly?


Jim Grandy wrote:
Hi,
I'm with the OpenLaszlo project, and as you may know we're writing a DHTML runtime for OpenLaszlo (www.openlaszlo.org). I just tried our DHTML demonstration application, LZPIX (http://labs.openlaszlo.org, click on the "Launch DHTML" button) in a recent nightly build of Mozilla (Minefield 3.0a1, latest nightly as of 5/8/2006), and we're seeing an error: "Error: arguments is not defined".
We wrap our function bodies with a 'with (this) { ... }' block. We put this in a long time ago, and have semi-regretted it periodically since then -- the user benefits don't quite measure up to the continuing implementation headaches. It appears that the 'with (this)' scope is hiding the 'arguments' pseudo-parameter in this case, but only in the Mozilla nightly build -- we run as expected in Firefox 1.5 and 2.0a1.
A simple repro case is to try the following in the JS console:
( function () { alert(arguments); }) ()
( function () { with (this) { alert(arguments); } }) ()
The first _expression_ pops up an alert as expected, but the second gives the same 'arguments is not defined' error.
I can imagine we've been relying on nonstandard behavior, and the latest builds have simply tightened the semantics. On the other hand, it's possible there's a regression here. Before I file a bug in Bugzilla, I thought I'd ask on this list.
Thanks,
jim
_______________________________________________
dev-tech-js-engine mailing list

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to