[Feat] Included Shadow DOM & First-line PseudoElement#370
Open
pvillaverde wants to merge 1 commit intotsayen:masterfrom
Open
[Feat] Included Shadow DOM & First-line PseudoElement#370pvillaverde wants to merge 1 commit intotsayen:masterfrom
pvillaverde wants to merge 1 commit intotsayen:masterfrom
Conversation
[Feat] Included CSS:first-line pseudoElement
ShaMan123
added a commit
to ShaMan123/html-to-image
that referenced
this pull request
May 14, 2021
…ements Inspired by tsayen/dom-to-image#370 If element has `shadowRoot` property it is custom (and the shadow node is open) so fetch it's children. Closes bubkoo#128
15 tasks
bubkoo
pushed a commit
to bubkoo/html-to-image
that referenced
this pull request
May 17, 2021
* feat(custom-elements): ✨ obtain children of shadow node for custom elements Inspired by tsayen/dom-to-image#370 If element has `shadowRoot` property it is custom (and the shadow node is open) so fetch it's children. Closes #128 * fix: 🐛 add safety checks to support special/custom elements Introduced by 021f124 Access to shadow node exposes the code to custom elements that break the current code. Was breaking because of elements without a style node. This commit fixes these bugs with simple, NON-BREAKING safety checks. * test(htmltoimage): 🚨 Added tests covering custom elements renders mathfield custom element https://github.com/arnog/mathlive
|
This is exactly the solution I am looking for. Has anyone tested this out successfully? |
|
Is this library no longer maintained ? |
|
De-facto yes @bacloud23. If you want Typescript, |
|
thanks a lot 😁 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Greetings!
I needed to create an image from an Ionic application, which uses WebComponents with its ShadowDOM.
So I made a change to check if the element has ShadowDOM, use its childrens, otherwise as it were.
I also added the CSS :first-line pseudoElement