blob: 014b0564996814df385d0b8ee222a9989db55017 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
img {
font-size: 0;
}
</style>
</head>
<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>