Is it possible to know how script was loaded

Viewed 47

Suppose I have script source.js. There are two ways two load it:

  1. <script src="source.js"></script>
  2. via document.createElement and appendChild

Is it possible from inside source.js to know about the way of loading?

1 Answers
Related