- From: Russell Beswick <notifications@github.com>
- Date: Thu, 23 Jun 2022 16:59:23 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 23 June 2022 23:59:36 UTC
@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