const currentDomain = document.domain;Document: domain property / notebook
Document: domain property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const currentHostname = location.hostname;document.domain = domainString;document.domain = "example.com";document.domain = document.domain;