SPB Git

Repository Public

shadow.html 800 B 16 lines html

1<!doctype html>2<html><head><meta charset="utf-8"><title>Shadow and frames</title></head>3<body><h1>LIGHT-TEXT</h1>4<x-card id="host"></x-card>5<iframe id="inner" src="/p/frame-inner.html" width="400" height="150" title="inner frame"></iframe>6<script>7class XCard extends HTMLElement {8  constructor() { super(); const r = this.attachShadow({mode: 'open'});9    r.innerHTML = '<style>p{color:green}</style><p>SHADOW-TEXT</p><a href="/p/shadow-target.html">shadow link</a><x-inner></x-inner>'; }10}11class XInner extends HTMLElement {12  constructor() { super(); this.attachShadow({mode: 'open'}).innerHTML = '<span>NESTED-SHADOW-TEXT</span><a href="/p/nested-shadow-target.html">nested</a>'; }13}14customElements.define('x-inner', XInner); customElements.define('x-card', XCard);15</script></body></html>16
Files main
Menu

Theme