Skip to content

writable values of Symbol.toStringTag property of DOMIterables are overwritten to true  #1312

Closed
@canalun

Description

@canalun

Hi, core-js team. Thank you for developing this great library.

Background

packages/core-js-pure/override/modules/web.dom-collections.iterator.js sets writable of Symbol.toStringTag property of DOM Iterables as true.
That is because createNonEnumerableProperty() defines PropertyDescriptor with writable: true.

As a result, the presence or absence of core-js affects some systems whose behavior changes depending on the writable value.
For example, this part of lodash will be affected.

Question

  1. What is the reason for overwrite of the writable value of Symbol.toStringTag property of DOM Iterables? (I'm thinking about patching to stop this overwrite on my application using core-js. Of course, if I can help anything, I'd like to contribute to core-js also.)
  2. This file, packages/core-js-pure/override/modules/web.dom-collections.iterator.js, is in core-js-pure.
    I've thought that core-js will never overwrite prototypes. It's not correct??

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions