Skip to content

<details> block #117

Answered by simonhaenisch
e2045 asked this question in Q&A
Feb 23, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hey, you can also inject a script into the page that does this for you

---
script:
  content: "document.querySelectorAll('details').forEach(details => { details.open = true })"
---

<details>I'm in the details</details>

I just realized that the script option is not mentioned in the docs yet. See here:

/**
* List of scripts to load into the page.
*
* @see https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pageaddscripttagoptions
*/
script: FrameAddScriptTagOptions[];

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@e2045
Comment options

Answer selected by e2045
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants