Calling frontend javascript functions from backend (python flask)

Is it possible to have my backend flask call and execute a frontend javascript function?

I want to make a fetch call to an outside url and return the data to the backend for processing.
I already checked and the site that I want to call has no referrer policy and cors token; it is reachable through a simple fetch call (No cookies required).
Frontend example:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>My Simple Website</title>
<head>

<form action="/backend_route">
    <button type="submit">search</button>
</form>

<script>
# function that will fetch an outside website and send data back to frontend
</script>
</body>
</html>

backend example:

@app.route('/backend_route')
def backend_route():
    # takes the initial data from frontend, processes, and **Somehow have users browser send request to an outside site**
    # have the request be sent from the user's browser (ip, user-agent)

    # take data returned from javascript fetch call and process it

   return render_template()


I am thinking about using flask yield to stream urls that the javascript needs to visit and return to data to backend after the button is clicked but i dont know if it works or if there is a better solution.