Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

Object.getPrototypeOf Redirect 1

Summary

The Object.getPrototypeOf() method returns the prototype (i.e. the internal [[Prototype]]) of the specified object.

Syntax

Object.getPrototypeOf(obj)

Parameters

obj
The object whose prototype is to be returned.

Throws

Throws a TypeError exception if the object parameter isn't an Object.

Specifications

Specification Status Comment
ECMAScript 5.1 (ECMA-262)
The definition of 'Object.getPrototypeOf' in that specification.
Standard Initial definition.
ECMAScript 6 (ECMA-262)
The definition of 'Object.getProtoypeOf' in that specification.
Draft  

Browser compatibility

Feature Firefox (Gecko) Chrome Internet Explorer Opera Safari
Basic support 3.5 5 9 12.10 (maybe earlier) 5
Feature Firefox Mobile (Gecko) Android IE Mobile Opera Mobile Safari Mobile
Basic support ? ? ? ? ?

Based on Kangax's compat table.

Opera-specific notes

  • Even though older Opera versions don't support Object.getPrototypeOf() yet, Opera supports the non-standard __proto__ property since Opera 10.50.

See also

Document Tags and Contributors

 Last updated by: Sheppy,