Skip to main content
Participant
February 10, 2020
Answered

iframe adobe canvas

  • February 10, 2020
  • 1 reply
  • 670 views

How can I insert an iframe in Adobe canvas, is there any javascript code?

This topic has been closed for replies.
Correct answer ClayUUID

It's just standard JavaScript. Literally thousands of tutorials out there if you'd bother to look. Like, a single line as a basic start point:

canvas.parentNode.appendChild(document.createElement("iframe"));

 

1 reply

Legend
February 10, 2020

You can't insert an iframe INTO a canvas element. The best you can do is create an iframe in the DOM and float it over the canvas so it looks like it's part of the canvas.

Participant
February 13, 2020

Thank you very much, could you tell me how you can do that?

ClayUUIDCorrect answer
Legend
February 13, 2020

It's just standard JavaScript. Literally thousands of tutorials out there if you'd bother to look. Like, a single line as a basic start point:

canvas.parentNode.appendChild(document.createElement("iframe"));