blob: c6801d8a958e37a1342933e79d0f6613fc079762 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
body, html {
margin: 0;
}
.cover-block-container {
position: absolute;
top: 0;
left: 0;
width: 200px;
height: 200px;
background-color: black;
}
</style>
</head>
<body>
<img src="../resources/green-400x400.png"></img>
<div class="cover-block-container"></div>
<script>
addEventListener("load", () => {
let image = document.querySelector("img");
internals.installImageOverlay(image, [], [
{
topLeft : new DOMPointReadOnly(0.1, 0.1),
topRight : new DOMPointReadOnly(0.4, 0.1),
bottomRight : new DOMPointReadOnly(0.4, 0.4),
bottomLeft : new DOMPointReadOnly(0.1, 0.4),
text : "This is a lot of text that might overflow the overlay block unless we do something about it.",
}
]);
const block = internals.shadowRoot(image).querySelector("div.image-overlay-block");
block.style.overflow = "visible";
});
</script>
</body>
</html>