MDN self-hosted library · e01.org

WorkerLocation: origin property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
// On this page, returns the origin
const result = self.location.origin; // Returns:'https://developer.mozilla.org:443'