Function waitForComplete

Returns a Promise that is resolved when the Document:readyState is "complete" (or if it's already "complete", the Promise is fulfilled immediately).