Skip to content

Latest commit

 

History

History
46 lines (42 loc) · 1.1 KB

File metadata and controls

46 lines (42 loc) · 1.1 KB

BOM objects: screen / location

Screen MDN

// Screen data sample:
console.log(screen);
/**
 * {
 *   availHeight: 949,
 *   availLeft: 0,
 *   availTop: 23,
 *   availWidth: 1680,
 *   colorDepth: 24,
 *   height: 1050,
 *   orientation: {angle: 0, type: "landscape-primary", onchange: null}
 *   pixelDepth: 24,
 *   width: 1680,
 * }
 */

Location MDN

// Location data sample
// -> https://developer.mozilla.org/en-US/docs/Web/API/Location?replace=true
console.log(location);
/**
 * {
 *   ancestorOrigins: DOMStringList {length: 0},
 *   assign: ƒ assign(),
 *   hash: "",
 *   host: "developer.mozilla.org",
 *   hostname: "developer.mozilla.org",
 *   href: "https://developer.mozilla.org/en-US/docs/Web/API/Location?replace=true",
 *   origin: "https://developer.mozilla.org",
 *   pathname: "/en-US/docs/Web/API/Location",
 *   port: "",
 *   protocol: "https:",
 *   reload: ƒ reload(),
 *   replace: ƒ (),
 *   search: "?replace=true"
 * }
 */