Prerequisite
·The id of the specified div is changed every period of time using setInterval
Question
·Is it possible to save the designated div drawing contents in the browser as animation gif?
Supplementary
·I don't want to use specialized tools as much as possible
·If you throw something through a script, you can get the result. API is acceptable
Assume
·Save by right-clicking
·Or save as some action in the js script
·Or save automatically after a certain period of time after loading the page
If you draw an image on Canvas, you can get the data, create a GIF image using FileAPI, etc., and download it at any time by using download attributes of Blob and a element a.
Also, since SVG can be drawn on Canvas, any html element you want to draw under SVG foreignobject element can be built in with style applied inline and it can be achieved under certain restrictions.
© 2024 OneMinuteCode. All rights reserved.