Load scene into frame

Long ago, I managed to make this work : allow a scene form a project to be loaded into a frame in another scene.
This perfectly works on Safari but not on iPad with Hype Reflect.
Any idea ?

LoadSceneIntoIframe.hype.zip (27.7 KB)

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)

1 Like

A post was split to a new topic: Jump to a scene based on the ID of the button