Open Bug 2008627 Opened 4 months ago

Lazy-load tab hover preview panel HTML

Categories

(Firefox :: Tabbed Browser, task)

task

Tracking

()

People

(Reporter: sthompson, Unassigned)

Details

The panel HTML is defined in the main-popupset.inc.xhtml file. https://searchfox.org/firefox-main/rev/33bba5cfe4a89dda0ee07fa9fbac578353713fd3/browser/base/content/main-popupset.inc.xhtml#556-574 The application code only initializes the tab hover panels the first time the user hovers over a tab or tab group label https://searchfox.org/firefox-main/rev/33bba5cfe4a89dda0ee07fa9fbac578353713fd3/browser/components/tabbrowser/content/tabs.js#1142 We can put the panel markup into a <template> and mount the templated content at the same time that we initialize the tab hover panels.

Aside from any other benefits or effects, this would make it easier to use reusable components like moz-box-button that have inline references to images. Including those types of elements in main-popupset.inc.html means that they load on startup, whereas using those within a template means that we can defer the load of their images, CSS, etc.

You need to log in before you can comment on or make changes to this bug.