Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gnat authored Oct 23, 2023
1 parent a85531d commit d928f7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,5 @@ Tailwind verbosity goes up with more child elements.
```

## 🔎 Technical FAQ
* Why do you use `QuerySelectorAll()` and not just process the `MutationObserver` results directly?
* Processing `MutationObserver` results will work well until you begin recieving subtrees (ex: DOM swap, [htmx](https://htmx.org), ajax, jquery) which requires you to walk all subtree child elements to not miss a `<style>`. This can involve re-scanning thousands of repeated elements, and `QuerySelectorAll()` ends up the simplicty and performance winner.
* Why do you use `querySelectorAll()` and not just process the `MutationObserver` results directly?
* Processing `MutationObserver` results will work well until you begin recieving subtrees (ex: DOM swap, [htmx](https://htmx.org), ajax, jquery) which requires you to walk all subtree child elements to not miss a `<style>`. This can involve re-scanning thousands of repeated elements, and `querySelectorAll()` ends up the simplicty and performance winner.

0 comments on commit d928f7e

Please sign in to comment.