Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Not that I think that you would mind

14 views
Skip to first unread message

Thomas 'PointedEars' Lahn

unread,
Jun 7, 2016, 2:21:20 PM6/7/16
to
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.
0 new messages