This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Script needs to know where it is running. One possibility is to update document.currentScript so that it ponits the <script> elements of running script. This is how Blink implementation happens to be working.
https://dvcs.w3.org/hg/webcomponents/rev/0cc454ff223a