Path: csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn 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> References: Reply-To: Thomas 'PointedEars' Lahn 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 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] [1] [2] -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.