Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8" />
<title>Translations Test</title>
<style>
div {
margin: 10px auto;
width: 300px
}
p {
margin: 47px 0;
font-size: 21px;
line-height: 2;
}
</style>
</head>
<body>
<h1>This is content in light DOM</h1>
<div id="host1"></div>
<script>
const host1 = document.getElementById("host1");
const root1 = host1.attachShadow({mode: "open"});
root1.innerHTML = "<div id='innerHost'></div>";
const innerHost = root1.querySelector("div");
const innerRoot = innerHost.attachShadow({mode: "open"});
</script>
</body>
</html>