Skip to content

Commit bd82738

Browse files
authored
Merge pull request #29 from Monsido/anh/opti-11125/investigate-shadow-dom-support
OPTI-11125 add nested shadow dom with style rule example
2 parents 732713a + ef30ec9 commit bd82738

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

build/serve.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const ctx = await esbuild.context(settings);
1616
await ctx.watch();
1717

1818
const { port } = await ctx.serve({
19-
port: 5000,
19+
port: 8000,
2020
servedir: 'www',
2121
fallback: 'index.html',
2222
});

dist/index.cjs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/data-collector/data-collector.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ export declare class DataCollector {
2828
private removeDefaultStyles;
2929
private getAttributesList;
3030
private cleanUpText;
31+
private escapeQuotation;
3132
}

www/data-collector.html

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
}
3535
customElements.define('my-element', MyElement);
3636
</script>
37-
<script type="module">
37+
<script type="module">
3838
import { DataCollector } from './index.js';
3939

4040
async function collectData () {
@@ -56,7 +56,17 @@ <h2>Data collector</h2>
5656
<pre id="data_collector_output"></pre>
5757
<my-element>
5858
<div slot="main">This is a custom element</div>
59+
<p class="nest-text-red">with some content</p>
60+
</my-element>
61+
<my-element>
62+
<div slot="main">
63+
<my-element>
64+
<style>.nest-text-red { color: red; }</style>
65+
<div slot="main" class="nest-text-red">This is a nested custom element</div>
66+
<p>with some content</p>
67+
</my-element>
68+
</div>
5969
<p>with some content</p>
6070
</my-element>
6171
</body>
62-
</html>
72+
</html>

0 commit comments

Comments
 (0)