Currently I'm not using prototype because I remember that a day I've read an article where it was stated that Prototype is not supported in IE 7 and down below, but I can't find that article again but by the way it would be good to know how it is supported overall.
The Prototypal Inheritance is a feature in javascript used to add methods and properties in objects. It is a method by which an object can inherit the properties and methods of another object. Traditionally, in order to get and set the [[Prototype]] of an object, we use Object. getPrototypeOf and Object.
In JavaScript, inheritance is supported by using prototype object. Some people call it "Prototypal Inheriatance" and some people call it "Behaviour Delegation". Let's see how we can achieve inheritance like functionality in JavaScript using prototype object.
__proto__ is considered outdated and somewhat deprecated (moved to the so-called “Annex B” of the JavaScript standard, meant for browsers only). The modern methods to get/set a prototype are: Object.
Both objectOne and objectTwo are non-function objects therefore they don't have a prototype property.
JScript (Microsoft's interpretation of Javascript) has supported the prototype property since version 2.0 (MSDN). The first version of Internet Explorer that supported JScript 2.0 was IE 3 (MSDN).
I'd say you're safe with IE7!
Edit: perhaps you're thinking about modifying the prototypes of host objects, such as Node
. This is indeed not supported by IE >=7, and is a bad idea anyway. A good article on this is at perfectionkills.com.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With