The following applescript waits for a page to load before continuing with the
error "Safari got an error: Connection is invalid." number -609
The error always highlights the
source as text part of the script. I tried changing
length of (source as text) is not 0 to
repeat until name is "example domain" but the error still occurs if no windows are open and Safari is running.