Skip to content

Commit 1dc67e7

Browse files
committed
wip
1 parent 2279104 commit 1dc67e7

File tree

1 file changed

+21
-0
lines changed
  • packages/signals/signals/src/core/signal-generators/dom-gen

1 file changed

+21
-0
lines changed

packages/signals/signals/src/core/signal-generators/dom-gen/dom-gen.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,40 @@ export const cleanText = (str: string): string => {
5454
}
5555

5656
interface ParsedElementBase {
57+
/**
58+
* The attributes of the element -- this is a key-value object of the attributes of the element
59+
*/
5760
attributes: Record<string, unknown>
5861
classList: string[]
5962
id: string
63+
/**
64+
* The labels associated with this element -- either from the `labels` property or from the `aria-labelledby` attribute
65+
*/
6066
labels?: Label[]
67+
/**
68+
* The first label associated with this element -- either from the `labels` property or from the `aria-labelledby` attribute
69+
*/
6170
label?: Label
6271
name?: string
6372
nodeName: string
6473
tagName: string
6574
title: string
6675
type?: string
76+
/**
77+
* The value of the element -- for inputs, this is the value of the input, for selects, this is the value of the selected option
78+
*/
6779
value?: string
80+
/**
81+
* The text content of the element -- this is the text content of the element, stripped of newlines, tabs, and multiple spaces
82+
*/
6883
textContent?: string
84+
/**
85+
* The inner text of the element -- this is the text content of the element, stripped of newlines, tabs, and multiple spaces
86+
*/
6987
innerText?: string
88+
/**
89+
* The element referenced by the `aria-describedby` attribute
90+
*/
7091
describedBy?: Label
7192
}
7293

0 commit comments

Comments
 (0)