Using Hype Javascript in my Customized Javascript Outside of Hype

Hey Hypers,
I’m creating accordion in a html widget, and I’m trying to get the scene title and pass into the html widget so I can display the right data within the html widget. I’ve created a javascript within hype by calling the currentSceneName function but I’m having trouble calling that function in my customized javascript outside of Hype.

Can you post the Hype file so we can see what is going on?

1 Like

you’ll need to handle a window.parent as target to grab data. depth is up to your doc-construct …
have a look over here: thread

or may be read / write some data to sessionstorage …

You can set your Scene name as a variable attached to the window by running this function:

window.TitleOfDocument = hypeDocument.currentSceneName();

Then, you can use this variable anywhere you want in the same window: window.TitleOfDocument

You can also use sessionStorage to store information, and when the window is closed, the session ends, and is removed.