Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #28036

Re: What is this inside a function?

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: What is this inside a function?
Date 2015-06-07 23:48 +0200
Organization PointedEars Software (PES)
Message-ID <4280548.92UKxee3U8@PointedEars.de> (permalink)
References <55745377$0$12997$c3e8da3$5496439d@news.astraweb.com> <878ubvjqgp.fsf@bsb.me.uk>

Show all headers | View raw


Ben Bacarisse wrote:

> The expression new F(...args...) calls the [[Contruct]] internal method
> on F and that method is defined to bind this to an empty object.  The
> [[Construct]] method goes on to call the [[Call]] internal method so the
> main difference between new F(...args...) and F(...args...) is this
> special binding for that.
> 
> (This is not the correct terminology because 'this' is not a name has no
> bindings,

Parse error.

> but it simpler to put it this way.)

<http://ecma-international.org/ecma-262/5.1/#sec-11.1.1>
| The “this” keyword evaluates to the value of the <ThisBinding> of the 
| current execution context.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

What is this inside a function? Steven D'Aprano <steve@pearwood.info> - 2015-06-08 00:21 +1000
  Re: What is this inside a function? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-07 19:58 +0100
    Re: What is this inside a function? "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-07 21:19 +0200
      Re: What is this inside a function? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-07 20:43 +0100
      Re: What is this inside a function? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-08 01:08 +0200
        Re: What is this inside a function? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-12 19:19 +0200
    Re: What is this inside a function? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 23:48 +0200

csiph-web