HTML form post using Visualizer

Hi folks,

I am making a request that returns HTML in which a form is built using JavaScript and submitted on page load, for example:

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8"/>
    var tdsMethodNotificationValue = 'eyJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjRiMjZiZjMyLTk4YmEtNGM4Yi1hN2ZlLWFhNDRlMjg5YmViMiJ9';

    var form = document.createElement("form");
    form.setAttribute("method", "post");
    form.setAttribute("action", "");

    addParameter(form, "threeDSMethodData", tdsMethodNotificationValue);


    function addParameter(form, key, value) {
        var hiddenField = document.createElement("input");
        hiddenField.setAttribute("type", "hidden");
        hiddenField.setAttribute("name", key);
        hiddenField.setAttribute("value", value);

I’ve set up a visualizer in a test like so:

const html = pm.response.text();

// set that template to pm.visualizer

However, when I click the Visualize tab, the form is not posted. I can see it is rendered by opening the inspector but I wondered if there are any restrictions on what can be rendered/executed? For example, I tried a simple alert within a template and this also failed to run.