Skip to content

Conversation

@hoxyq
Copy link
Contributor

@hoxyq hoxyq commented Dec 5, 2025

Error.prepareStackTrace is non-standard feature and not all JavaScript runtimes implement the methods that we are using in React DevTools backend.

This PR adds additional checks for the presence of the methods that we are using.

@hoxyq hoxyq requested review from eps1lon and sebmarkbage December 5, 2025 12:23
@meta-cla meta-cla bot added the CLA Signed label Dec 5, 2025
@hoxyq hoxyq force-pushed the devtools/feature-check-structured-stack-trace-methods branch from a93e9d9 to 465c2be Compare December 5, 2025 12:42
@hoxyq hoxyq force-pushed the devtools/feature-check-structured-stack-trace-methods branch from 465c2be to c2bacca Compare December 5, 2025 12:54
hoxyq added a commit that referenced this pull request Dec 5, 2025
Follow-up to #34641.
Similar to #35293,
#35294.

React DevTools backend can be used in non-DOM environments, so we have
to feature-check some DOM APIs.
For now I am just no-oping newly added commands for Native, we should
revisit this decision once we would roll out Suspense panel there, if
needed. I am not sure if scrolling will be required as much as it is
needed on Web.

`isReactNativeEnvironment()` check is kinda clowny, but we've been
relying on it for quite some time already.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants