let lastSheetSet = document.lastStyleSheetSet;
if (!lastSheetSet) {
lastSheetSet = "Style sheet not yet changed";
} else {
console.log(`The last style sheet set is: ${lastSheetSet}`);
}Document: lastStyleSheetSet property / notebook
Document: lastStyleSheetSet property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.