Skip to content

Conversation

@darwin808
Copy link

Summary

Fixes #54732

The Event class defines phase constants (NONE, CAPTURING_PHASE, AT_TARGET, BUBBLING_PHASE) using Object.defineProperty without configurable: true. This causes the event-target-shim library to fail when it tries to redefine these properties, which in turn breaks abort-controller and consequently fetch() in New Architecture apps.

This PR adds configurable: true to all 8 property definitions (4 on Event class, 4 on Event.prototype) to match the standard behavior expected by DOM polyfills.

Changelog:

[GENERAL] [FIXED] - Add configurable:true to Event phase constant property descriptors to fix event-target-shim compatibility

Test Plan

  1. Create a React Native app with New Architecture enabled
  2. Execute any fetch() request
  3. Verify the error Cannot assign to read-only property 'NONE' no longer occurs
Fixes facebook#54732

The Event class defines phase constants (NONE, CAPTURING_PHASE, AT_TARGET,
BUBBLING_PHASE) using Object.defineProperty without configurable:true. This
causes the event-target-shim library to fail when it tries to redefine these
properties, breaking abort-controller and consequently fetch() in New
Architecture apps.

This adds configurable:true to all 8 property definitions (4 on Event class,
4 on Event.prototype) to match the standard behavior expected by DOM polyfills.
@meta-cla
Copy link

meta-cla bot commented Dec 30, 2025

Hi @darwin808!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 30, 2025
@meta-cla
Copy link

meta-cla bot commented Dec 30, 2025

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

2 participants