Thunderbird Sieve Addon Blog
Brought to you by:
thsmi
JavaScript and static methods are something special, they don't work as you expect it form an object oriented language. That's because JavaScript is prototyped.
Take the following example:
:::javascript
function A () {
}
A.nodeName = function () {
alert("Name is A");
}
A.prototype.doSomething = function() {
alert("doSomething");
}
/A.prototype.nodeName = function() {
return this.proto.constructor.nodeName();
}/
A.nodeName();
var a = new A()
a.nodeName();