title: How to get method that changes name in javascript
body: <p>I am making a script that changes settings on twitch.tv</p>
  <p>When I need to check if a toggle button is checked, this is simple enough. But the method name to catch the true, false value on the .checked, changes every time I load the page.</p>
  <pre><code>var latencyButton = document.getElementsByClassName(&quot;tw-toggle__input&quot;)[0];
  
  if(latencyButton.__reactEventHandlers$kupq2smnamk.checked) 
     latencyButton.click();
     console.log(&quot;Latency Changed&quot;);
  }
  </code></pre>
  <p>It's the __reactEventHandlers$(This part) that changes so I have something to start off on.</p>
  <p>Edit: added the HTML that surrounds the toggle button</p>
  <pre><code>&lt;div data-test-selector=&quot;low-latency-toggle&quot; class=&quot;tw-align-items-center tw-flex&quot;&gt;&lt;label class=&quot;tw-drop-down-menu-input-item__label tw-flex-grow-1 tw-mg-r-2&quot; for=&quot;f8960cb3c79352dd6dd718358e42a812&quot;&gt;Low Latency&lt;/label&gt;&lt;div class=&quot;tw-toggle&quot; data-test-selector=&quot;low-latency-toggle&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;tw-toggle__input&quot; id=&quot;f8960cb3c79352dd6dd718358e42a812&quot; data-a-target=&quot;tw-toggle&quot;&gt;&lt;label for=&quot;f8960cb3c79352dd6dd718358e42a812&quot; class=&quot;tw-toggle__button&quot;&gt;&lt;p class=&quot;tw-hide-accessible&quot;&gt;Low Latency&lt;/p&gt;&lt;/label&gt;&lt;/div&gt;&lt;/div&gt;
  </code></pre>
  <p>Is there a way to get the checked value without the name of the method? or like a way to get the method name to use in a variable?</p>
  <p>Thanks for you time
  -Crysal</p>