title: How to create a button in HTML for a NodeJS function?
body: <p>I want to create a button, that rotates the screen in my <code>Electron app</code>. <a href="https://www.npmjs.com/package/display-rotation-windows" rel="nofollow noreferrer">The NPM package functions are straight-forward</a>. I created a script containing</p>
  
  <pre><code>const displayRotationWindows = require('display-rotation-windows');
  const buttonCW = document.getElementById('rotateCW');
  buttonCW.addEventListener('click', function(e) {
      displayRotationWindows.rotateCW();
  });
  </code></pre>
  
  <p>and added it in my <strong>index.html</strong> via</p>
  
  <pre><code>&lt;script src="displayRotation.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>The script is supposed to listen to the button or anchor tag with the id <code>rotateCW</code> being clicked and then call the display rotation function. The rotation function works for sure, because when I start the application and then run the displayRotation.js containing just the function displayRotationWindows.rotateCW(); from VSCode, the screen does rotate.</p>