mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
comment out hydration error script
This commit is contained in:
@@ -4,6 +4,20 @@ description: Trees allow you to display a hierarchical list of selectable tree i
|
||||
layout: component
|
||||
---
|
||||
|
||||
```html {.example}
|
||||
<wa-tree selection="multiple">
|
||||
<wa-tree-item>
|
||||
Parent Node
|
||||
<wa-tree-item selected>Child Node 1</wa-tree-item>
|
||||
<wa-tree-item>
|
||||
Child Node 2
|
||||
<wa-tree-item>Child Node 2 - 1</wa-tree-item>
|
||||
<wa-tree-item>Child Node 2 - 2</wa-tree-item>
|
||||
</wa-tree-item>
|
||||
</wa-tree-item>
|
||||
</wa-tree>
|
||||
```
|
||||
|
||||
```html {.example}
|
||||
<wa-tree>
|
||||
<wa-tree-item>
|
||||
@@ -241,4 +255,4 @@ Decorative icons can be used before labels to provide hints for each node.
|
||||
</wa-tree-item>
|
||||
</wa-tree-item>
|
||||
</wa-tree>
|
||||
```
|
||||
```
|
||||
@@ -20,15 +20,16 @@ declare global {
|
||||
/**
|
||||
* This will hopefully move to a library or be built into Lit. Right now this does nothing.
|
||||
*/
|
||||
function handleHydrationError(e: Event) {
|
||||
const element = e.target as WebAwesomeElement;
|
||||
// function handleHydrationError(e: Event) {
|
||||
// const element = e.target as WebAwesomeElement;
|
||||
// const str = `Expected <${element.localName}> to not have hydration error.`
|
||||
|
||||
expect(false).to.equal(true, `Expected ${element.tagName} to not have hydration error.`);
|
||||
}
|
||||
// expect(false).to.equal(true, str);
|
||||
// }
|
||||
|
||||
// This is a non-standard event I have added to the WebAwesomeElement base class.
|
||||
// https://github.com/lit/lit/discussions/4703
|
||||
document.addEventListener('lit-hydration-error', handleHydrationError);
|
||||
// document.addEventListener('lit-hydration-error', handleHydrationError);
|
||||
|
||||
/**
|
||||
* Loads up a fixture and loads all client components
|
||||
|
||||
Reference in New Issue
Block a user