The below written code says 'cannot read property 'textContent' of null' help me somebody : <form action="{%url 'Eats_app:pause_button'%}" method="post">
              {% csrf_token %}
              <button class="btn btn-primary " type="submit" value="Pause" id="pausebutton" style="padding-left: 3rem; padding-right: 3rem;" >Pause</button>
              <!-- /* <input class="btn btn-primary " type="submit" value="Pause" id="pausebutton" onclick="toggleTheButton()" style="padding-left: 3rem; padding-right: 3rem;"> */ -->
</form>



document.querySelector('#pausebuttons').textContent.toggle('Pause', 'Resume');