Re: Cookie problem! Getting error when passing the expire date.
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Cookie problem! Getting error when passing the expire date.

From: Lasse Reichstein Nielsen <lrn@hotpop.com>
Date: Sun Apr 30 2006 - 23:22:14 CEST

Thomas 'PointedEars' Lahn <PointedEars@web.de> writes:

> As for the latter, one should keep in mind that every function is
> indeed a method (ES3 Final, 4.3.3) in ECMAScript implementations --
> if its owner is (and therefore the function is called as a member
> of) only the Variable Object of the execution context (the Global
> Object for globally declared functions, and built-in top-level
> functions such as Number(); see ES3 Final, subsection 10.1.5).

Not all functions are methods, although there isn't really a lot
you can do about function without them becoming methods (which
also proves that the official terminology is not very good, if
all functions are also methods, we don't need two words).

Witnes:
 var x = ((function(){}).prototype={}),42);

The function created here has no other object property referring to it
than it's own prototype.constructor, so when we override this, it's no
longer a method. We also have no reference to it, since all variables
are also properties of objects (global, arguments or activation
object), and we dare not call it, or it will become the method
arguments.callee, so it's completely useless :)

A more relevant distinction would be whether a function is *called* as
a method or not (i.e., called through a Reference value, setting
the value of the "this" operator in the method body during the call,
instead of it defaulting to the global object).

/L

-- 
Lasse Reichstein Nielsen  -  lrn@hotpop.com
 DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
  'Faith without judgement merely degrades the spirit divine.'
Received on Mon May 1 05:28:22 2006