Do setTimeout twice so I don't break tests that do a setTimeout. Followup to bug 369319.

This commit is contained in:
dbaron%dbaron.org 2007-02-13 00:03:50 +00:00
parent bc6d59da44
commit 006225b9ff

View File

@ -196,7 +196,11 @@ function IFrameToKey()
function OnDocumentLoad()
{
setTimeout(DocumentLoaded, 0);
// Since we can't use a bubbling-phase load listener from chrome,
// this is a capturing phase listener. So do setTimeout twice, the
// first to get us after the onload has fired in the content, and
// the second to get us after any setTimeout(foo, 0) in the content.
setTimeout(setTimeout, 0, DocumentLoaded, 0);
}
function DocumentLoaded()