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


Groups > comp.lang.javascript > #30645 > unrolled thread

Re: Not that I think that you would mind

Started byThomas 'PointedEars' Lahn <PointedEars@web.de>
First post2016-06-07 20:21 +0200
Last post2016-06-07 20:21 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.javascript

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#30645 — Re: Not that I think that you would mind

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2016-06-07 20:21 +0200
SubjectRe: Not that I think that you would mind
Message-ID<6635206.mgXtfmctJ7@PointedEars.de>
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.

[toc] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web