Tag Archives: javascript es6

Get Caller JavaScript File Location

If you need to get the Path to the current Javascript file being executed, you can use this small function: const location = (function () { if (document.currentScript) { let link = document.currentScript.src; let lastIndex = link.lastIndexOf(‘/’); link = link.substring(0, … Continue reading
HTML Elements, Web Components
, ,

Leave a comment