Running JS in Streamlit HTML does not work

I’m trying to use D3.js in an ST app, but whether I use st.write, st.markdown, st.components.vs.html, I always get the result, that JS is not enabled - this is the result in the browser
image

Here is the code / a simple console.log just to test

# Streamlit app layout
st.title("Tree Visualization")

st.components.v1.html("""
<!DOCTYPE html>
<html>
<head>
    <title>Tree</title>
</head>
<body>
    <script>
        console.log("Test");
    </script>
    <p>Test</p>
</body>
</html>
""")

I have tried to search forums and Google, but did not get any results. Has anybody seen same problem and know a solution?

Thanks in advance.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.