Skip to content

No mention of other APIs that can make it so "obj" is not extensible error is thrown #41658

@Lightning00Blade

Description

@Lightning00Blade

MDN URL

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_define_property_object_not_extensible

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

The information only mentions is regarding Object.preventExtensions, but there are other methods that may force this error.

What did you expect to see?

I was expecting to see 3 other ways this can show up:

  1. When an object was sealed via Object.seal()
  2. When an object was frozen via Object.freeze()
  3. When using ESM modules and export default {} the exported object is not extensible

Do you have any supporting links, references, or citations?

  1. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal#description

  2. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze#description

  3. Not sure if I am reading the spec but maybe this - https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-module-namespace-exotic-objects

Do you have anything more you want to share?

No response

MDN metadata

Page report details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions