|
|
@ -40,6 +40,13 @@ To start with we need to create a data structure that both represents a DOM tree
|
|
|
|
|
|
|
|
|
|
|
|
I see three parts: the name of the tag, the tag's properties, and its children.
|
|
|
|
I see three parts: the name of the tag, the tag's properties, and its children.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|----------+-----------------------------|
|
|
|
|
|
|
|
|
| name | 'div', 'h1', 'input' |
|
|
|
|
|
|
|
|
| props | 'class', 'type', 'disabled' |
|
|
|
|
|
|
|
|
| children | <h1>, <input>, Hello |
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|
tag name: 'div'
|
|
|
|
tag name: 'div'
|
|
|
|
tag prop: 'class'
|
|
|
|
tag prop: 'class'
|
|
|
|