mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
Documents created by DOMParser and fragment documents do not have an origin set on the document by the spec. These documents also happen to never become fully active. By properly implementing the steps for the <img> element to only update the image data for documents which are fully active, this fixes a crash for img elements in these types of documents. Unfortunately, this is not a full fix for the microtask queue case. This is because it seems possible for node document for an <img> element to be changed during the microtask queue for that document. It is not clear to me how this can be fixed in a nice way.
8 lines
342 B
HTML
8 lines
342 B
HTML
<!DOCTYPE html>
|
|
<body>
|
|
<div id="image-container">Original content</div>
|
|
|
|
<script>
|
|
document.getElementById('image-container').innerHTML = '<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" width="150">';
|
|
</script>
|
|
</body>
|