DevTools: Improve browser extension iframe support (#19827)

Co-authored-by: Joel DSouza <joel.dsouza@kapturecrm.com>
Co-authored-by: Damien Maillard <damien.maillard@dailymotion.com>
Co-authored-by: Brian Vaughn <brian.david.vaughn@gmail.com>
This commit is contained in:
6h057
2020-09-14 10:04:46 -04:00
committed by GitHub
co-authored by Joel DSouza Damien Maillard Brian Vaughn
parent 917cb01a58
commit ec39a5e901
30 changed files with 147 additions and 130 deletions
@@ -0,0 +1,23 @@
<!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>
<div id="root"></div>
<script>
const MyComponent = () => {
return React.createElement("h1", null, "Parent", React.createElement(MainIframe, null, null));
};
const MainIframe = () => {
return React.createElement("iframe", {src: "./main.html", sandbox:"allow-same-origin allow-scripts"}, null);
}
const el = () => React.createElement(MyComponent, null)
ReactDOM.render(el(), document.getElementById('root'))
</script>
</body>
</html>