const screenDetails = await window.getScreenDetails();
// Return the device pixel ratio of the first screen
const screen1DPR = screenDetails.screens[0].devicePixelRatio;ScreenDetailed: devicePixelRatio property / notebook
ScreenDetailed: devicePixelRatio property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.