This is with reference to the question : How may I reference the script tag that loaded the currently-executing script?
And the most upvoted answer. It mentions in option 6 : "6. Get the last executed script"
Problems
Does not work with asynchronous scripts (defer & async)
Does not work with scripts inserted dynamically
My script is not async, but the page might have other scripts that are async or defer. Would this option work in that case as well? I have not been able to find an answer to this anywhere.