title: How to display a global javascript variable in typo3 using typoscript?
body: <p>I would like to output a global variable &quot;elemenId&quot; that is created by a javascript in typo3.</p>
  <p>The javascript writes the ID of the touched html element in the global variable elementId:</p>
  <pre><code>document.addEventListener(&quot;touchstart&quot;, (e) =&gt; {
                  // get elementId of touched element and save as global variable elementId for further processing
                  window.elementId = e.target.id;
                  });
  </code></pre>
  <p>I would like to display the elementId value in typo3.
  Is there any chance to access this variable in typo3 using typoscript? Something like:</p>
  <pre><code>lib.global_variable = COA_INT
  lib.global_variable {
      20 = TEXT
      20.data = GP : elementId
      }
  </code></pre>
  <p>Is there any other way to achieve that?
  Thanks a lot for your help!</p>