[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

Not that I think that you would mind

ram

6/7/2016 1:21:00 AM

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.