Here is my page:
<html>
<head>
<script src = "//myremoteserver.com/chat.js"></script>
<script>
var chat = new Chat();
</script>
How can I retrieve the url of the script inside the Chat class?
(answer : //myremoteserver.com/chat.js)
I tried:
window.location.origin; gives me the url of the current page document.getElementsByTagName('script') : do not provide url