Opened 10 months ago

Last modified 10 months ago

#6804 new change

Run element hiding emulation before the DOMContentLoaded event

Reported by: mjethani Assignee:
Priority: P3 Milestone:
Module: Core Keywords:
Cc: hfiguiere, kzar Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by mjethani)


Currently we wait for the DOMContentLoaded event before running element hiding emulation on the document. While this makes sense, often the elements we want to hide are already available in the DOM (and visible to the user) while the DOM is still loading! The MutationObserver object starts reporting new elements being added to the DOM before the DOM is even ready.

Because we wait until DOMContentLoaded, the elements are hidden much later than they could be, which makes for a poor user experience.

We are using the hide-if-contains snippet as a substitute for now (#6809).

What to change

[Investigate if element hiding emulation can be run on the document before the DOM is ready and update this space.]

Change History (1)

comment:1 Changed 10 months ago by mjethani

  • Description modified (diff)
Note: See TracTickets for help on using tickets.