1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='initial-scale=1'>
<script>
function imageOverlaysAsText()
{
const result = [];
for (const image of Array.from(document.images)) {
const root = internals.shadowRoot(image);
if (!root)
continue;
const overlay = root.getElementById("image-overlay");
if (!overlay)
continue;
result.push(overlay.textContent);
}
return result;
}
function appendImage(imageSource)
{
const image = document.createElement("img");
image.src = imageSource;
document.body.appendChild(image);
}
function hideAllImages()
{
Array.from(document.images).forEach(image => image.style.setProperty("display", "none"));
}
function showAllImages()
{
Array.from(document.images).forEach(image => image.style.removeProperty("display"));
}
</script>
</head>
<body style='margin: 0px;'>
<p>large-red-square.png</p>
<img src="large-red-square.png">
<p>sunset-in-cupertino-200px.png</p>
<img src="sunset-in-cupertino-200px.png">
<p>test.jpg</p>
<img src="test.jpg">
<p>400x400-green.png</p>
<img src="400x400-green.png">
<p>sunset-in-cupertino-100px.tiff</p>
<img src="sunset-in-cupertino-100px.tiff">
</body>
</html>
|