replace deprecated st.components.v1.html with st.iframe#9
replace deprecated st.components.v1.html with st.iframe#9Omid-Sedighi-Mornani wants to merge 1 commit into
Conversation
- Add relevant folders to .gitignore
|
I am a bit confused about the choice for the replacement. I looked at the docs for
This indicates that we need to use st.html instead. Is this a version update issue? Meaning, are you using iframe because of the version of Streamlit being used? I dont have a lot of time to work on and review this atm, so I am asking for clarification here. |
You’re right — there is unsafe_allow_javascript=True, so my assumption was incorrect. My original reasoning was that st.html is not iframe-based (so javascript gets ignored by default), while components.v1.html is, so I went with explicitly using iframes to ensure JS execution was isolated and consistent. This is also because of a warning, that I got from the streamlit application using the deprecated components.v1.html:
indicating that we should use But with unsafe_allow_javascript=True, JS can apparently also work within |
Thank you. That would help me greatly! I'll try to review as soon as possible and also try to update Streamlit and do some testing to make sure things look good. Hopefully, it wont be too long. Thanks for catching this and providing a solution! Also, please let me know if you used AI in development. Im not opposed to AI, but I do have extra checks I go through when AI is used. |
Uh oh!
There was an error while loading. Please reload this page.