Files
antrean-anjungan/examples/nuxt3-websocket-client/node_modules/nuxt/dist/app/composables/url.js
T
2025-09-18 19:01:22 +07:00

9 lines
247 B
JavaScript

import { getRequestURL } from "h3";
import { useRequestEvent } from "./ssr.js";
export function useRequestURL(opts) {
if (import.meta.server) {
return getRequestURL(useRequestEvent(), opts);
}
return new URL(globalThis.location.href);
}