__proto__
The __proto__ property is a legacy way to access or change an object's prototype chain. Modern code should favor standard prototype APIs and explicit object construction instead.
Overview
The __proto__ property is a legacy way to access or change an object's prototype chain. Modern code should favor standard prototype APIs and explicit object construction instead.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
javascript.builtins.Object.proto Deprecated | 1 | 12 | 1 | 3 | 18 | 1 |
Syntax
// __proto__ example
// See MDN Web Docs for details Live demo
Inspect an object's prototype
Compare __proto__ with Object.getPrototypeOf on a plain object.
Create a simple inheritance chain
Link one object to another prototype and read inherited properties.
Use a null-prototype dictionary
Create a dictionary object without inherited Object.prototype members.
Use cases
Legacy debugging
Inspect old prototype-heavy code when modern Object APIs were not used consistently.
Migration work
Touch __proto__ only while replacing older patterns with safer, standard alternatives.
Cautions
- __proto__ is legacy behavior and can make object relationships harder to reason about than explicit APIs.
- Prototype mutation affects inheritance and performance in ways that are easy to misuse.
Accessibility
- No direct accessibility effect, but unstable object behavior can still surface as broken UI state.
- Prefer clearer object models that reduce maintenance risk in user-facing code.
Related links
Powered by web-features