mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb: Allow executing scripts for iframes with src=about:blank
Fixes https://github.com/SerenityOS/serenity/issues/23836
This commit is contained in:
committed by
Alexander Kalenik
parent
c07d18c017
commit
94d72c174a
Notes:
sideshowbarker
2024-07-17 02:39:10 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/94d72c174a Pull-request: https://github.com/SerenityOS/serenity/pull/23891 Issue: https://github.com/SerenityOS/serenity/issues/23836
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<body>
|
||||
<iframe id="target" src="about:blank"></iframe>
|
||||
<script>
|
||||
asyncTest(done => {
|
||||
window.addEventListener("message", event => {
|
||||
println(event.data);
|
||||
done();
|
||||
});
|
||||
var script = target.contentDocument.createElement("script");
|
||||
script.innerHTML = `parent.postMessage("message from test iframe", "*");`;
|
||||
target.contentDocument.body.appendChild(script);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
Reference in New Issue
Block a user