mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
Adding more comments.
This commit is contained in:
parent
4df0b2c558
commit
15ee8e389b
@ -38,6 +38,23 @@
|
||||
* SUMMARY: Testing |with (x) {function f() {}}| when |x.f| already exists
|
||||
* See http://bugzilla.mozilla.org/show_bug.cgi?id=185485
|
||||
*
|
||||
* The idea is this: if |x| does not already have a property named |f|,
|
||||
* a |with| statement cannot be used to define one. See, for example,
|
||||
*
|
||||
* http://bugzilla.mozilla.org/show_bug.cgi?id=159849#c11
|
||||
* http://bugzilla.mozilla.org/show_bug.cgi?id=184107
|
||||
*
|
||||
*
|
||||
* However, if |x| does have a property |f|, a |with| statement can be
|
||||
* used to modify the value it contains. This should work even if we use
|
||||
* a |var| statement, like this:
|
||||
*
|
||||
* with (x) {var f = 1;}
|
||||
*
|
||||
* or a function statement, like this:
|
||||
*
|
||||
* with (x) {function f() {}}
|
||||
*
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
var UBound = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user