Skip to content

Commit

Permalink
Revert 921c659 causing visual flash on DOM load. (honestbleeps#5440)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmcgarry authored Dec 22, 2022
1 parent 868db4d commit d3eb3cf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/utils/pagePhases.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/* @flow */

import { waitFor } from './async';
import { waitForEvent, waitForDescendant } from './dom';
import { waitForChild, waitForEvent, waitForDescendant } from './dom';

// `document.body === null` at this point has been reported for users of Firefox and Chrome,
// so wait till the reference has been updated before progressing
export const bodyStart: Promise<*> = waitFor(() => document.body, 10);
export const bodyStart: Promise<*> = waitForChild(document.documentElement, 'body')
// `document.body === null` at this point has been reported for users of Firefox and Chrome,
// so wait till the reference has been updated before progressing
.then(() => waitFor(() => document.body, 10));

export const contentStart: Promise<*> = bodyStart
.then(() => Promise.race([
Expand Down

0 comments on commit d3eb3cf

Please sign in to comment.