mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -04:00
17 lines
360 B
TypeScript
17 lines
360 B
TypeScript
|
const blob = new Blob(
|
||
|
["export default function() {\n return <div>Hello Deno!</div>\n}\n"],
|
||
|
{ type: "text/jsx" },
|
||
|
);
|
||
|
const url = URL.createObjectURL(blob);
|
||
|
|
||
|
const { default: render } = await import(url);
|
||
|
|
||
|
// deno-lint-ignore no-explicit-any
|
||
|
(globalThis as any).React = {
|
||
|
createElement(...args: unknown[]) {
|
||
|
console.log(...args);
|
||
|
},
|
||
|
};
|
||
|
|
||
|
render();
|