elements object and iframe code example
Example 1: iframe attributes
<iframe width="560" height="315" src="https://www.youtube.com/embed/owsfdh4gxyc" frameborder="0" allowfullscreen></iframe>
Example 2: use javascript to control iframe elements
<iframe id="myIFrame" src="thispage.html"
width="100%" height="600"
frameBorder="2">
</iframe>
const iFrame = document.getElementById('myIFrame');
const buttonInIFrame = iFrame.contentWindow.document.getElementById('myButton');
iFrame.contentWindow.yourFunction();