title: How might I get the script filename from within that script?
body: <p>I'm pretty sure the answer is no, but thought I'd ask anyway.</p>
  
  <p>If my site references a scripted named "whatever.js", is it possible to get "whatever.js" from within that script? Like:</p>
  
  <pre><code>var scriptName = ???
  
  if (typeof jQuery !== "function") {
      throw new Error(
          "jQuery's script needs to be loaded before " + 
          scriptName + ". Check the &lt;script&gt; tag order.");
  }
  </code></pre>
  
  <p>Probably more trouble than it's worth for dependency checking, but what the hell.</p>