Passing slot to javascript

class ActionFetchData(Action): def init(self) → None: super().init() self.sio = sio self.retrieved_messages = None

def name(self) -> Text:
    return "action_fetch_data"

def run(
    dispatcher: CollectingDispatcher,
    tracker: Tracker,
    domain: Dict[Text, Any],
) -> List[Dict[Text, Any]]:
    def handle_chat_message(data):
        message = data.get("message")         
        self.retrieved_messages = message

    self.sio.on("chat message", handle_chat_message)
    handoff_value = tracker.get_slot("handoff_value")
    cek_socket_url = tracker.get_slot("socketurl")
    print("check ", cek_socket_url)    
    return [
        SlotSet("handoff_value", handoff_value), 

Log print: check localhost:3001

is there any how to pass the slot of socketurl to my js code? !(function () { let e = document.createElement(“script”), t = document.head || document.getElementsByTagName(“head”)[0]; (e.src = “./js/index.js”), (e.async = true), (e.onload = () => {
const socketurl2 = “{{ socketurl }}”;
console.log(“socketurl:”, socketurl2); window.WebChat.default( { initPayload: “/greet”, customData: { language: “en” }, socketUrl: “http://localhost:5007”, title: “HelpBot”, subtitle: “say hi and get started!”, }, null );

log: socketurl: {{ socketurl }}

it was supposed to be socketurl: localhost:3001, i’m confused how to pass slot socketurl from my rasa app to my js in index.html, they are all in the same directory, but i need to pass my socketurl slot to my js in index.html