Skip to content Skip to sidebar Skip to footer
Showing posts with the label Prototype Programming

What Are Pitfalls Of Extending Object.prototype?

I want to extend Object.prototype, to basically support notifications in JSON data and html element… Read more What Are Pitfalls Of Extending Object.prototype?

Javascript Prototype Method Override Not Found

I have this base type: typeA = function () { }; typeA.prototype = { do = function() { alert (&#… Read more Javascript Prototype Method Override Not Found

Javascript Prototype Declaration

There are two pieces of codes. Why is the first one correct but the second one incorrect? What'… Read more Javascript Prototype Declaration

Javascript Inheritance: When Constructor Has Arguments

Using pure JavaScript to do inheritance, this is what I usually do: function A() {} A.prototype.run… Read more Javascript Inheritance: When Constructor Has Arguments