title: How to reload a JavaScript of a page without reloading the page (Vanilla JS)
body: <p>I have nested fields that are being appended to the DOM when a user wants to add more fields. this is being done by a nested_fields.js file.</p>
  <p>The issue is one of the fields being appended is a calender field that is being handled by another JS file called calender_manager.js</p>
  <p>calender_manager.js is using the Flatpickr module and it looks for input tags with the .flatpickr class in the HTML file of the page. This happens when the page is loaded so the fields appended to the DOM by nested_fields.js with the .flatpickr class don't get picked up by calender_manager.js.</p>
  <p>So far my solution is to make one custom JS file for the nested calendar fields that handles appending the nested fields and adding flatpickr. I was wondering if there is a better way.</p>