Skip to main content
Participant
February 25, 2020
Question

Multiple HTML5 canvas on one page without Iframes

  • February 25, 2020
  • 1 reply
  • 649 views

We have the need to have multiple canvases on one page, however the Animate HTML5/JS export always assumes there will always be only one canvas on the page ever.   I've read the previous solutions from years ago of using iframes, but that is just not an option for us.  

Seems like it would have be simple to include a namespace option for all the 'export-specific' js variables and functions in the Publish Settings, similar to custom namespaces for lib, createjs, and images.  Like instead of the main ID of 'canvas' could be 'canvasCustom1234' so there would be no conflicts.  Going through each exported html and renaming everything so they play nice with other exported code from Animate isn't a very good process - anyone find a way to get this to work without iframes?

Thanks

This topic has been closed for replies.

1 reply

Legend
February 26, 2020

Why are iframes not an option?

tm3001Author
Participant
February 28, 2020

Site policy.  Do you have any alternatives?

Inspiring
February 29, 2020

You could maybe use iframes with a data-uri as source filled with javascript?