Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
I read that the embedded html are within an iframe. If I am able to obtain the element id of this iframe. Should I be able to do the following?
If this is possible, my 2nd question is whether it is possible to obtain the iframe id in vaadin? Or the GWT obfuscator does a great job to prevent me from doing so?
I have figured out how to do it. The following is what I have done. I hope it helps if other people have similar problems.
In this piece of JS code. I did
1. iterate through window.frames, which contain the iframe that embeds my external html.
2. for each frame, i obtain the tile of the frame: myframe.document.title. If the external html contains a <title> tag. myframe.document.title should contain the value of the <title> tag. so I can find which frame is the iframe that contains my external html page.
3. call myframe.myJsFunction()
I can see my WebGL 3D cubes start rotating if I click a vaadin button that executes the above JS code. :grin: