-
-
Save chaorace/ccaaa3f3968677f06922db1331faa84e to your computer and use it in GitHub Desktop.
Subframe element issue reproduction steps @ qutebrowser/qutebrowser#7617
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<button type="button" onclick="clicked(this)">IFrame Button</button> | |
<div id="shadow-root"></div> | |
<script> | |
function clicked(element){ element.innerHTML = 'Clicked' } | |
const shadow = document.getElementById('shadow-root').attachShadow({ mode: 'open' }) | |
const shadowButton = document.createElement('button') | |
shadowButton.type = 'button"' | |
shadowButton.innerHTML = 'IFrame Shadow Button' | |
shadowButton.onclick = function(){ clicked(this) } | |
shadow.appendChild(shadowButton) | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<button type="button" onclick="clicked(this)">Normal Button</button> | |
<div id="shadow-root"></div> | |
<script> | |
function clicked(element){ element.innerHTML = 'Clicked' } | |
const shadow = document.getElementById('shadow-root').attachShadow({ mode: 'open' }) | |
const shadowButton = document.createElement('button') | |
shadowButton.type = 'button' | |
shadowButton.innerHTML = 'Shadow Button' | |
shadowButton.onclick = function(){ clicked(this) } | |
shadow.appendChild(shadowButton) | |
</script> | |
<iframe src="./example-iframe.html"> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment