forked from sveltejs/svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff6ce72
commit ad3e43d
Showing
3 changed files
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<svelte:options tag="custom-element"/> | ||
|
||
<script> | ||
import Screen from './screen.svelte'; | ||
</script> | ||
|
||
<Screen> | ||
screen1 | ||
</Screen> |
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,4 @@ | ||
<svelte:options tag="bugslot-screen" /> | ||
|
||
<p>not slotted</p> | ||
<slot>default</slot> |
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,14 @@ | ||
import * as assert from 'assert'; | ||
import './main.svelte'; | ||
import './screen.svelte'; | ||
|
||
export default function (target) { | ||
target.innerHTML = `<custom-element></custom-element>`; | ||
|
||
const [a] = target.querySelectorAll('custom-element'); | ||
|
||
assert.htmlEqual(a.shadowRoot.innerHTML, ` | ||
<p>not slotted</p> | ||
<slot>screen1</slot> | ||
`); | ||
} |