Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
doc(queryconfig): Moved default values up to first snipped as proposed
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
  • Loading branch information
MatthiasKainer and timdeschryver committed Nov 23, 2021
commit 011d3f298b2aa40827ef141814bd033d1a834bcb
8 changes: 4 additions & 4 deletions docs/dom-testing-library/api-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,14 @@ configure({
})
```

Defaults to `element.querySelector` and `element.querySelectorAll`.

The interface of the functions will take two arguments, `element` and `query`,
which the wrapper can use. The expected return value is a single element (for
`queryElement`) or a list of elements (for `queryAllElements`).

This can be used to extend queries to reach into the shadow dom or
iframes. An example using the
This can be used to extend queries to reach into the shadow dom or iframes. An
example using the
[query-selector-shadow-dom](https://github.com/Georgegriff/query-selector-shadow-dom)
library looks like the following:

Expand All @@ -150,5 +152,3 @@ configure({
queryAllElements: querySelectorAllDeep,
})
```

Default to `element.querySelector` and `element.querySelectorAll`.