html2canvas works on firefox, not on chrome

Viewed 92

I'm using the html2canvas module to make a screenshot of angular components made of d3.js and c3.js libraries to show charts.

Everything works fine in angular, the problem comes when i convert the angular components in custom elements and try to get the screenshot of the charts. I get two different behaviors based on the browser using:

  1. On Firefox I get in the console this error ERROR TypeError: this.ngElementStrategy is undefined but the screenshot works fine.

  2. On Chrome I get this error SyntaxError: Error parsing CSS component value, unexpected EOF and the screenshot is not created.

My goal would be to make the library working also on chrome obviously; looking on the web the Chrome error should be related to a CSS class not supported by html2canvas, but i tried removing all the CSS imports from my test page and the error persists.

The different behaviors are strange assumed that in angular works but after the conversion to custom elements it doesn't only on chrome...

Anyone has any idea?

0 Answers
Related