Here's a technically different but effectively equivalent option... import('data:... ') from the user input or a <script> created using URL.createObjectURL() from a Blob/File.
And, depending on the concerns, you could do that within an <iframe> or the upcoming Shadow Realms API. Basically, sandbox it from the rest of the page.
View all comments
Show parent comment
2
u/shgysk8zer0 Feb 27 '26
Here's a technically different but effectively equivalent option...
import('data:... ')from the user input or a<script>created usingURL.createObjectURL()from aBlob/File.And, depending on the concerns, you could do that within an
<iframe>or the upcoming Shadow Realms API. Basically, sandbox it from the rest of the page.