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

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Not that I think that you would mind
Date 2016-06-07 20:21 +0200
Organization PointedEars Software (PES)
Message-ID <6635206.mgXtfmctJ7@PointedEars.de> (permalink)
References <mind-20160607021406@ram.dialup.fu-berlin.de>

Show all headers | 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