简体   繁体   English

在 iframe 中使用 react 开发工具 [在 Chrome 中]

[英]Using react dev tools inside iframe [In Chrome]

When react app is inside an iframe, dev tool chrome extension for react is not working.当 react 应用程序位于 iframe 内时,用于 react 的开发工具 chrome 扩展不起作用。

Refererd: https://github.com/facebook/react/issues/18945参考: https : //github.com/facebook/react/issues/18945

Solution suggested by the dev tools team: https://github.com/zalmoxisus/redux-devtools-extension/pull/56 .开发工具团队建议的解决方案: https : //github.com/zalmoxisus/redux-devtools-extension/pull/56

"Adds the 'all_frames' option to the manifest.json to allow DevTools to access iframes that might hold the Store instead of the main page". “将‘all_frames’选项添加到 manifest.json 以允许 DevTools 访问可能包含商店而不是主页的 iframe”。

What should I do to enable the dev tools in iframe.我应该怎么做才能在 iframe 中启用开发工具。 should I clone the devtools repo ( https://github.com/facebook/react/tree/master/packages/react-devtools-extensions#build-steps ) and add all_frames option and use it ?我应该克隆 devtools 存储库( https://github.com/facebook/react/tree/master/packages/react-devtools-extensions#build-steps )并添加 all_frames 选项并使用它吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM