Html2canvas: Please provide a synchronous API

Created on 1 Oct 2018  路  1Comment  路  Source: niklasvh/html2canvas

In today's browsers certain things can only be done synchronously. Following 2 examples come to mind:

  1. clipboard API - when user clicks a button, the clipboard api call has to be synchronous in the onClick event otherwise browser blocks it
  2. browser beforeunload event - will not wait for asynchronous code to write

for these cases it's important to provide a synchronous API. As it is now, I am unable to copy an svg chart to clipboard when the users asks for it because i'm limited by html2canvas async API.

Most helpful comment

A synchronous API is needed in many circumstances.

>All comments

A synchronous API is needed in many circumstances.

Was this page helpful?
0 / 5 - 0 ratings