blob: 46f2079dea213995761bfd26735782045b583b48 [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 : "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
}
]);
const block = internals.shadowRoot(image).querySelector("div.image-overlay-block");
block.style.overflow = "visible";
});
</script>
</body>
</html>