Browse the docs

chromeIsComplete

Returns 1 when Google Chrome has finished loading its current tab, otherwise 0.

Keyboard Maestro: CHROMEISCOMPLETE

Details #

chromeIsComplete() takes no arguments and returns a number: 1 when the page in the current tab of the front window reports document.readyState as complete, 0 while it is still loading.

It asks Google Chrome, so it runs a small piece of JavaScript in the tab.

Parameters #

Takes 0 arguments. {{ chromeIsComplete() }}

Examples #

chromeIsComplete()
→ 0

Gotchas #

  • Needs Automation permission for the browser (System Settings, Privacy & Security, Automation). Without it, or when the browser isn't running, the answer is 0.

  • A 0 also comes back when the tab can't be read, so it can't tell "still loading" from "no browser".

  • Passing an argument is an error: chromeIsComplete() takes 0 arguments, got 1.