Skip to content
JS
JavaScript error

TypeError

The JavaScript exception "can't set prototype of this object" occurs when attempting to set the prototype of an object, but the object's prototype is frozen, either by being a built-in immutable prototype object, or by being non-extensible.

Reference entryJavaScriptFetched
TypeError: Immutable prototype object 'Object.prototype' cannot have their prototype set (V8-based)
As listed by MDN Web Docs
TypeError: #<Object> is not extensible (V8-based)
As listed by MDN Web Docs
TypeError: can't set prototype of this object (Firefox)
As listed by MDN Web Docs
TypeError: Cannot set prototype of immutable prototype object (Safari)
As listed by MDN Web Docs
TypeError: Attempted to assign to readonly property. (Safari)
As listed by MDN Web Docs
Category
TypeError
Severity
error
Runtime
both
or press Cmd/Ctrl + Enter. The text is only sent to this site to match it.
Source: MDN Web Docs. Data fetched 2026-09-25T01:48:37.273Z.