You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check this if you would like to implement a PR, we are more than happy to help you go through the process.
What problem are you trying to solve?
I wanted to use this library to render a chart in an Express endpoint, or to a file.
Describe the solution you'd like
When I write code that manipulates DOM, I either have a optional argument for document or take document from element.ownerDocument if I am already taking an element as an argument. Similar solution would work here. This would require some changes to eliminate any global window and document references, but would help for two cases:
Running this on the backend
Trying to render chart in an iframe from the top level frame
Describe alternatives you've considered
I will try to mock window and document, but I don't think it is going to work.
Documentation, Adoption, Migration Strategy
Users should not notice a difference. The changes would only take an effect when the element is passed to chart constructor. In that case, that elements parent window and document would be used, instead of the globals.
The text was updated successfully, but these errors were encountered:
Would you like to work on this feature?
What problem are you trying to solve?
I wanted to use this library to render a chart in an Express endpoint, or to a file.
Describe the solution you'd like
When I write code that manipulates DOM, I either have a optional argument for
document
or take document fromelement.ownerDocument
if I am already taking an element as an argument. Similar solution would work here. This would require some changes to eliminate any globalwindow
anddocument
references, but would help for two cases:Describe alternatives you've considered
I will try to mock window and document, but I don't think it is going to work.
Documentation, Adoption, Migration Strategy
Users should not notice a difference. The changes would only take an effect when the element is passed to chart constructor. In that case, that elements parent window and document would be used, instead of the globals.
The text was updated successfully, but these errors were encountered: