protocol
URL: protocol
From MDN: "The protocol property of the URL interface is a string representing the protocol scheme of the URL, including the final ':'."
Notes & further reading
Always includes the final
:
characterSpec: URL Standard
MDN: URL.protocol
Example value:
const url = new URL("https://elide.dev/?one=two#hello");
url.protocol;
← "https:"
Content copied to clipboard
Note: This property is present on a mutable version of the URL
interface.