Skip to content

support custom html elements #128

Closed
Closed
@ShaMan123

Description

@ShaMan123

Expected Behavior

The toXXX() should manage to capture custom elements as well.

Possible Solution

Maybe the custom component is needed as a resource?
OR
tsayen/dom-to-image#370 =>

const children = toArray<HTMLElement>(nativeNode.childNodes)

Additional Context

I am trying to take a snapshot of an element that has a custom element defined by math-live
Input
math
Output
math_test
It seems the capturing took the innerHTML/value attribute of the custom element

Test Playground

https://codesandbox.io/s/blue-thunder-gog6j?file=/src/App.tsx

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions