зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1494162 - Part 32: Lazy load Grid components. r=pbro
This commit is contained in:
Родитель
3ee7394331
Коммит
5dab8a6e0d
|
@ -9,9 +9,18 @@ const dom = require("devtools/client/shared/vendor/react-dom-factories");
|
|||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { getStr } = require("devtools/client/inspector/layout/utils/l10n");
|
||||
|
||||
const GridDisplaySettings = createFactory(require("./GridDisplaySettings"));
|
||||
const GridList = createFactory(require("./GridList"));
|
||||
const GridOutline = createFactory(require("./GridOutline"));
|
||||
// Normally, we would only lazy load GridOutline, but we also lazy load
|
||||
// GridDisplaySettings and GridList because we assume the CSS grid usage is low
|
||||
// and usually will not appear on the page.
|
||||
loader.lazyGetter(this, "GridDisplaySettings", function() {
|
||||
return createFactory(require("./GridDisplaySettings"));
|
||||
});
|
||||
loader.lazyGetter(this, "GridList", function() {
|
||||
return createFactory(require("./GridList"));
|
||||
});
|
||||
loader.lazyGetter(this, "GridOutline", function() {
|
||||
return createFactory(require("./GridOutline"));
|
||||
});
|
||||
|
||||
const Types = require("../types");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче