There’s a workaround for touch scrolling the Hype runtime has in place that generates an extra div within the HTML Widget element on iOS. So you’re modifying the src
attribute on the wrong element.
The Normal structure looks like:
<div class = "HYPE_element" id = "render">
<iframe></iframe>
</div>
The iOS structure looks like:
<div class = "HYPE_element" id = "render">
<div>
<iframe></iframe>
</div>
</div>
So instead of using .children[0]
I would use .getElementsByTagName("iframe")[0]
for your search.
(The internal DOM structure of Hype documents is reserved for us to change in future releases)