title: Copy to clipboard javascript in Postman Visualizer not working [SOLVED]
body: <p>I'd like to understand fundamentally why it doesn't work, and if there are any workarounds.</p>
  <p>In my pre-request script:</p>
  <pre><code>let template = `
  &lt;html&gt;
      &lt;body&gt;
  
          &lt;button onclick=&quot;myFunction()&quot;&gt;Copy text&lt;/button&gt;
  
          &lt;script&gt;
              function myFunction() {
                  navigator.clipboard.writeText(&quot;COPYTEST&quot;);
              }
          &lt;/script&gt;
  
      &lt;/body&gt;
  &lt;/html&gt;
  `;
  pm.visualizer.set(template);
  </code></pre>
  <p>The button just doesn't do anything</p>
  <p><a href="https://i.stack.imgur.com/5fsun.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5fsun.png" alt="visualizer" /></a></p>