CDN library initializing using window object

I am currently using this CDN in my retool app https://cdn.wepay.com/wepay.full.js

The library is currently add its own objects into the window object but it doesn't seem to be available in the app. Does retool allow the window object to be used this way?

Hey @Timothy_Fung!

Retool runs its Javascript in a sandboxed environment so you most likely won't have access to the parent window's methods as you've noticed.

Would you mind sharing a bit more about your use case? I'm wondering if there are any other possible workarounds!

Hi Victoria,

I'm unclear on what you mean. Does that mean I cannot give retool any external CDN? Is that for all environments or does production environment not have this issue?

Ah, happy to clarify!

You can give Retool external CDNs, see this doc: https://docs.retool.com/docs/custom-js-code#custom-javascript-libraries--npm-modules

However, certain libraries won't work (e.g. if they need access to modify the window object)

Hi @victoria you said, we can not access the parent windows object. so is it possible to remove the query params when I switch into tabs ?

Hey Bilal! How are you currently setting your query params and how are you currently switching tabs?