Oui, ça devrait, mais ce n'est pas le cas
. Le JS compilé contient bien
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
Location.prototype.toString = function () {
var r = '';
r += this._streetNumber;
if (this._multiplier != null) {
r += this._multiplier;
}
r += this._street;
if (this._extension != null) {
r += this._extension;
}
r += this._postCode;
if (this._postCodeExtension != null) {
r += this._postCodeExtension;
}
r += this._city;
return r;
}; |
Ce qui devrait être une surcharge de toString, mais un
console.log(this.location.toString());
me renvois toujours [object Object] ...
Partager