comment out hydration error script

This commit is contained in:
konnorrogers
2024-10-01 17:47:04 -04:00
parent cadc1b9267
commit 1fbd8e48b6
2 changed files with 21 additions and 6 deletions

View File

@@ -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>
```
```

View File

@@ -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