The Wayback Machine - http://web.archive.org/web/20211009234123/https://github.com/facebook/react/issues/18945
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevTools: Improve browser extension iframe support #18945

Open

dmail opened this issue May 18, 2020 · 42 comments
Open

DevTools: Improve browser extension iframe support #18945

dmail opened this issue May 18, 2020 · 42 comments

Comments

@dmail
Copy link
Contributor

@dmail dmail commented May 18, 2020

When react is inside an iframe, chrome extension for react devtools fails to detect react.

This is because the extension sets __REACT_DEVTOOLS_GLOBAL_HOOK__ only on the top level window. Apparently it's possible to have __REACT_DEVTOOLS_GLOBAL_HOOK__ on iframes too by adding all_frames: true in extension manifest.json. It was done by redux devtools extension in zalmoxisus/redux-devtools-extension#56.

Have you considered adding all_frames: true to chrome extension ?

Steps To Reproduce

  1. Create a file react-main.html
">
<!DOCTYPE html>
<html>
  <head>
    <script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
    <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
  </head>
  <body></body>
</html>
  1. Create a file react-iframe.html