TradingView widget in R-Shiny is not displayed in the dashboard but can be seen in the browser

I'm trying to include a TradingView widget in Shiny, but all I see in the dashboard is a small blank window (of the correct size for the widget) followed by a "EURUSD Rates by TradingView" message. However, when I click on the "Open in Browser" option in the dashboard, the correct information is displayed in the browser window that was blank in the Shiny dashboard. I'm not using at all the Viewer in the pane that also has the File/Plots/Packages/Help/Viewer tabs.

The same behavior happens with other widgets from TradingView and other sites: they don't show up in the dashboard except for the one-line message at the bottom of the widget.

How to make the code below work and display the widget in the Shiny dashboard? Also, how to make it display at a specific location on the screen (instead of the top left corner)?


# From

ui <- fluidPage(
  <div class="tradingview-widget-container">
    <div class="tradingview-widget-container__widget"></div>
    <div class="tradingview-widget-copyright"><a href="" rel="noopener" target="_blank"><span class="blue-text">EURUSD Rates</span></a> by TradingView</div>
    <script type="text/javascript" src="" async>
     "symbol": "FX:EURUSD",
     "width": 350,
     "colorTheme": "dark",
     "isTransparent": false,
     "locale": "en"

server <- function(input, output, session) {}

shinyApp(ui, server)