Skip to main content

Command Palette

Search for a command to run...

Top level Objects in browser

Published
1 min read

window

  • window.innerHeight

  • window.innerWidth

  • window.navigator

  • window.location

    • url info
  • window.history

  • window.localStorage

  • window.sessionStorage

methods:

  • window.alert()

  • window.setTimeout()

  • window.open()

    • open a new tab by default

    • window.open("https://example.com", "_blank");

navigator

  • navigator.userAgent

  • navigator.language

  • navigator.platform

  • navigator.onLine

  • navigator.geoLocation

document

  • document.title

  • document.cookie // cookie

  • document.location // URL related

  • document.getElementById()

  • document.querySelector()

  • document.createElement()

location

  • location.href // full URL

  • location.protocol

  • location.host

  • location.hostname

  • location.port

  • location.pathname

  • location.search

  • location.hash

history

  • history.back()

  • history.forward()

  • history.pushState()

  • history.replaceState()