blob: 99a0ce61806e8ea3a3b384eec5f86906838c6c47 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<img src="../resources/green-400x400.png"></img>
<script>
addEventListener("load", () => {
let image = document.querySelector("img");
internals.installImageOverlay(image, [
{
topLeft : new DOMPointReadOnly(0.5, 0.5),
topRight : new DOMPointReadOnly(1, 0.5),
bottomRight : new DOMPointReadOnly(1, 1),
bottomLeft : new DOMPointReadOnly(0.5, 1),
children: [{
text : "Hello",
topLeft : new DOMPointReadOnly(0.5, 0.5),
topRight : new DOMPointReadOnly(1, 0.5),
bottomRight : new DOMPointReadOnly(1, 1),
bottomLeft : new DOMPointReadOnly(0.5, 1),
}],
}
]);
internals.shadowRoot(image).getElementById("image-overlay").style.color = "black";
});
</script>
</body>
</html>