---
# System prepended metadata

title: 011022 Phase 1 - Tangential Questions

---

# 011022 Phase 1 - Tangential Questions

### Do you have a preference between textContent and innerText? Is textContent "better"?

main difference is that innerText will include formatting (so if part of the text content is hidden to users it won't show up when you retrive innerText). It's a bit slower because of that, so I generally prefer textContent

### Do we need to know child/siblings/etc.

Child sibling relationship will be more important for presentation and semantics than using them often to target elements.

### If we have id why did we use querySelector instead of getElementById?

Habit, if you prefer using getElementById when you have an id, go for it!

### when do we need an event as a parameter for a callback function for listener and when not?

When you actually use the `event` inside of the callback:
- `event.target`
- `event.preventDefault()`

### What are some extra work to strengthen my DOM manipulation?

- Feel free to go through the exercises in the lecture code!  We didn't get to them in most lectures so there are some examples there with ___ where you can fill in what the code should be for that place to handle the todo list application.