Javascript functions

Hello! I’m using captivate 2019 in a project, and I’m trying to make a javascript communication of a game generated by webgl of unity, imported as “Animation in HTML5”. I want to make the communication between the game and the captivate, for example, call a function and pass parameters of the game to the captivate. Could someone give me some solution?