Call a Hype function from outside Hype object

Hello Hype / JavaScript gurus!

I have made a simple 'find a word' game utilising the canvas element:
https://content.une.edu.au/2020/find-a-word.html

When a word is found, I am hoping to trigger a hype function that will cross the word off a word list and play a "word found!" animation of some kind. I found this post where Daniel gives some code for calling Hype functions from outside of the Hype object:

HYPE.documents['DocumentName'].functions().MyFunction(HYPE.documents['DocumentName'],'foo',event);

.. hoping someone might be kind enough to explain what this code is achieving? Is the function that is being called one that has a name "MyFunction(e, foo)" - i.e passing event object and "foo" is a function parameter?

2 posts were merged into an existing topic: How to call hype js function from external HTML