mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 08:39:09 -05:00
966ce7de8a
This commit adds blob URL support. Blob URLs are stored in a process global storage, that can be accessed from all workers, and the module loader. Blob URLs can be created using `URL.createObjectURL` and revoked using `URL.revokeObjectURL`. This commit does not add support for `fetch`ing blob URLs. This will be added in a follow up commit.
11 lines
253 B
TypeScript
11 lines
253 B
TypeScript
const blob = new Blob(
|
|
[
|
|
'export { printHello } from "http://localhost:4545/cli/tests/subdir/mod2.ts"',
|
|
],
|
|
{ type: "application/javascript" },
|
|
);
|
|
const url = URL.createObjectURL(blob);
|
|
|
|
const { printHello } = await import(url);
|
|
|
|
printHello();
|