-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(synthetic-shadow): fix light DOM serialization (#2502)
* fix(synthetic-shadow): fix light DOM serialization Fixes #2425 * fix: fix deep shadows within light * fix: get it working in IE11 * fix: fix code comment * fix: fix code comment * fix: extract into shared function * fix: use treewalker * test: add some more sanity tests for light DOM depth
- Loading branch information
1 parent
13661ae
commit 9560942
Showing
12 changed files
with
193 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/integration-karma/test/light-dom/synthetic-shadow/x/consumer/consumer.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<template> | ||
<p>I am in the shadow</p> | ||
<p data-id="pInShadow">I am in the shadow</p> | ||
<slot data-id="slot"></slot> | ||
</template> | ||
</template> |
8 changes: 8 additions & 0 deletions
8
.../test/light-dom/synthetic-shadow/x/lightContainerDeepShadow/lightContainerDeepShadow.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<template lwc:render-mode="light"> | ||
<div data-id="wrapper"> | ||
<x-consumer data-id="consumer"> | ||
<p data-id="p">I am an assigned element.</p> | ||
I am an assigned text. | ||
</x-consumer> | ||
</div> | ||
</template> |
5 changes: 5 additions & 0 deletions
5
...ma/test/light-dom/synthetic-shadow/x/lightContainerDeepShadow/lightContainerDeepShadow.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class LightContainerDeepShadow extends LightningElement { | ||
static renderMode = 'light'; | ||
} |
10 changes: 10 additions & 0 deletions
10
...t/light-dom/synthetic-shadow/x/lightContainerDeeperShadow/lightContainerDeeperShadow.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<template lwc:render-mode="light"> | ||
<div data-id="wrapper"> | ||
<div data-id="innerWrapper"> | ||
<x-consumer data-id="consumer"> | ||
<p data-id="p">I am an assigned element.</p> | ||
I am an assigned text. | ||
</x-consumer> | ||
</div> | ||
</div> | ||
</template> |
5 changes: 5 additions & 0 deletions
5
...est/light-dom/synthetic-shadow/x/lightContainerDeeperShadow/lightContainerDeeperShadow.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class LightContainerDeeperShadow extends LightningElement { | ||
static renderMode = 'light'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters