blob: b63d05cee8e750af892a4360975ea494c60b9b22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<!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>
|