feat: allow user to provide custom pseudo elements to be captured #376
+89
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! Thanks for maintaining this great library!
I've tried it and just found that it might be great if we can control what pseudo elements will be included in the captured image rather than just
::before
and::after
, sometimes we might want to include some non-standard but useful ones, like::-webkit-scrollbar
and::-webkit-scrollbar-thumb
, so I created this PR to add a new optionincludedPseudoElements
to allow user to customize the rule of the included pseudo elements.Hope this can be helpful :)
Description
includedPseudoElements
.clonePseudoElements
to receive the includedPseudoElements list and clone all the pseudo elements in the list.Types of changes
Self Check before Merge