Created
August 11, 2022 21:58
-
-
Save leo60228/678632135129d0b840f9e5705854b707 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<script> | |
function prepare() { | |
var iframe = document.createElement('iframe'); | |
document.body.appendChild(iframe); | |
var doc = iframe.contentDocument; | |
doc.body.innerHTML = '<div>hello</div>'; | |
doc.execCommand('SelectAll', false, null); | |
iframe.style.width = '50px'; | |
iframe.style.height = '50px'; | |
iframe.offsetLeft; // Force layout | |
iframe.style.width = '200%'; | |
iframe.style.height = '200%'; | |
return iframe.contentWindow.getSelection(); | |
} | |
document.body.addEventListener('overflowchanged', function () { | |
document.body.innerHTML = 'This tests removing the iframe for which overflowchanged is dispatched. WebKit should not crash.'; | |
}); | |
prepare().collapseToStart(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment