How to send a variables from a main code (index) to HTML's content script?

I need an SDK extension to open an HTML page (safe-HTML which is stored in the data folder of the extension). This HTML needs to access a variable in the addon. How can I transfer the variable from the addon to the HTML?
In the panel, I could do that using port.emit and port.on but this requires the panel’s object in the addon,something like: myPanel.port.emit( ... ). Unlike the panel, the HTML page does not have object created int he addon. How can I allow the HTML page’s content script to receive a variable from the addon?