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


Groups > comp.lang.javascript > #30645

Re: Not that I think that you would mind

Path csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Not that I think that you would mind
Date Tue, 07 Jun 2016 20:21:12 +0200
Organization PointedEars Software (PES)
Lines 44
Message-ID <6635206.mgXtfmctJ7@PointedEars.de> (permalink)
References <mind-20160607021406@ram.dialup.fu-berlin.de>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace solani.org 1465323673 21827 eJwNycEBgEAIA7CVQKHgOD2h+4+g+SZvON4KJCKVWtDlY9zWNifop21Nlac44kVYZfs/fDAfPGsSFA== (7 Jun 2016 18:21:13 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Tue, 7 Jun 2016 18:21:13 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwFwYEBwCAIA7CXhpSK5wjS/09YEk5jbzCIUEjyz87yNkLp33ikZuFGsjmv3krEbODUU+kazHK4ep8Z1g9JghWk
Cancel-Lock sha1:Jpx89XSo4rwZO49/iZQ3HIYLziM=
X-NNTP-Posting-Host eJwFwQcBwEAIBDBLrIMipyz/Ej6BOnuHOdxwOEmNIe36t1iMHHr0dcXGGsGme7LQTpTCow8ZChDv
Xref csiph.com comp.lang.javascript:30645

Show key headers only | View raw


Stefan Ram wrote:

>   I prepared my course with Firefox 38. FWIW, in this browser
>   I observed this behaviour in the console:
> 
> |>this.Date.prototype.setTime( 0 )
> |<0
> |>this.Date.prototype.getTime()
> |<0
> |>this.Date.prototype.setTime( 1 )
> |<1
> |>this.Date.prototype.getTime()
> |<1
> 
>   I used this in my course as a simple explanation of setters
>   and getters. But no. A more recent firefox now gives:
> 
> |>this.Date.prototype.setTime( 0 )
> |XTypeError: setTime method called on incompatible Object
> 
>   Well, this was a rather strange way to call rather obscure
>   functions, so I guess no one will mind anyway.

There was no point in using “this” here in the first place.

As for the TypeError exception, “Firefox 38 was released on May 12th, 2015” 
[1], so its JavaScript 38 was not likely to have implemented algorithms 
introduced with in ECMAScript 2015 of *June* 2015.  Cf. [2]:

| · Date.prototype is now an ordinary object, not a Date instance anymore 
|   (bug 861219).

(It really helps to read the release notes.)

__________
[0] <http://www.ecma-international.org/ecma-262/6.0/index.html#sec-properties-of-the-date-prototype-object>
[1] <https://developer.mozilla.org/en-US/Firefox/Releases/38>
[2] <https://developer.mozilla.org/en-US/Firefox/Releases/41#JavaScript>

-- 
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 | Find similar | Unroll thread


Thread

Re: Not that I think that you would mind Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-07 20:21 +0200

csiph-web