···5import {
6 ReadableStream as PolyfillReadableStream,
7 ReadableByteStreamController as PolyfillReadableByteStreamController,
8-} from 'web-streams-polyfill';
910-if (typeof globalThis.ReadableByteStreamController === 'undefined') {
11 // Safari doesn't have byte stream support - use the polyfill's ReadableStream
12 // which includes full byte stream support
13 globalThis.ReadableStream = PolyfillReadableStream;
···5import {
6 ReadableStream as PolyfillReadableStream,
7 ReadableByteStreamController as PolyfillReadableByteStreamController,
8+} from "web-streams-polyfill";
910+if (typeof globalThis.ReadableByteStreamController === "undefined") {
11 // Safari doesn't have byte stream support - use the polyfill's ReadableStream
12 // which includes full byte stream support
13 globalThis.ReadableStream = PolyfillReadableStream;
···2627// Get the embed URL relative to this script's location
28const getEmbedUrl = () => {
29- return new URL('embed.html', import.meta.url).href;
30};
3132/**
···38 * @returns {Object} - Control object with methods to interact with the embed
39 */
40export function mount(container, { server, client }) {
41- const el =
42- typeof container === "string"
43- ? document.querySelector(container)
44- : container;
4546 if (!el) {
47 throw new Error(`RSC Explorer: Container not found: ${container}`);
···2627// Get the embed URL relative to this script's location
28const getEmbedUrl = () => {
29+ return new URL("embed.html", import.meta.url).href;
30};
3132/**
···38 * @returns {Object} - Control object with methods to interact with the embed
39 */
40export function mount(container, { server, client }) {
41+ const el = typeof container === "string" ? document.querySelector(container) : container;
0004243 if (!el) {
44 throw new Error(`RSC Explorer: Container not found: ${container}`);