I use a technology that needs to conduct different calls to the same external JS. The external JS is called inside an iframe and creates an output there. For example:
// Placement 1
<script async id="1234" src="external.js"></script>
// Placement 2
<script async id="1235" src="external.js"></script>
I know there were various related questions, but they all assumed the external file is called just once, so it doesn't need to choose which ID to take parameters from.
Is there a way inside the external.js to know which ID called it and used its parameters? For example, use "this" or "that" depending on which ID called it:
<script async id="1234" src="external.js?use=this" ></script>
<script async id="1234" src="external.js?use=that" ></script>
// or
<script async id="1235" src="external.js" data-use="this"></script>
<script async id="1235" src="external.js" data-use="that"></script>
// etc. Even the MYLIBRARY way*