Share feedback, ideas and get community help

Updated 5 months ago

Unable to access window inside text bubble

At a glance

The community member is facing an issue with accessing the window object for inline JavaScript injection using a text bubble, and they are looking for a better way to handle multiple languages. The comments suggest that using the "Set variable" block with the "Execute on client" option may be a better approach, as the code is evaluated on the server side. The community member also mentions that they managed to tackle the issue by creating a separate typebot to get the localized text, without having to access the window object.

is window not accessible for inline javascript injection using text bubble

Use case: multiple languages (if there is a better way let me know, currently i am setting a single variable using setblock and getting value to it but as you think, it is not efficient and clean at all)
Attachment
image.png
A
B
5 comments
as an alternative to not have to access window for creating localization.

I see that custom head code is available in the settings but it is not enabled in preview mode
Attachments
image.png
image.png
That is expected
The code is evaluated on server side
If you need to have access to client-side objects, you need to do it with a Set variable block with the Execute on client option
thank you i already had that enabled. the issue was within the set variable code πŸ˜„

I managed to tackle this issue of not having to access window by creating a seperate typebot which i can jump to and out of to get my localized text
Add a reply
Sign up and join the conversation on Discord