Re: [WICG/webcomponents] The way to access current script or current root, from Shadow DOM (#717)

@chrisodom that should be doable. You would just need to fetch the script and run the response through `scopedEval`. Something like this should work:

```
scripts.forEach(script => {
  let src = script.getAttribute('src');
  if (src) {
    fetch(src)
    .then(res => res.text())
    .then(s => scopedEval(s));
  } else {
    scopedEval(script.innerHTML);
  }
});
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/717#issuecomment-1165026531
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/717/1165026531@github.com>

Received on Thursday, 23 June 2022 23:59:36 UTC