зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1320939 - Lazy load tooltip event helpers. r=jdescottes
MozReview-Commit-ID: 1FXSUprpCN7 --HG-- extra : rebase_source : d641c6d6f27390f9dfaaeecffe2ec86a88617652
This commit is contained in:
Родитель
2b6192d5b7
Коммит
ba94c75930
|
@ -14,10 +14,13 @@ const nodeConstants = require("devtools/shared/dom-node-constants");
|
|||
const clipboardHelper = require("devtools/shared/platform/clipboard");
|
||||
const {setImageTooltip, setBrokenImageTooltip} =
|
||||
require("devtools/client/shared/widgets/tooltip/ImageTooltipHelper");
|
||||
const {setEventTooltip} = require("devtools/client/shared/widgets/tooltip/EventTooltipHelper");
|
||||
const MarkupContainer = require("devtools/client/inspector/markup/views/markup-container");
|
||||
const ElementEditor = require("devtools/client/inspector/markup/views/element-editor");
|
||||
|
||||
// Lazy load this module as _buildEventTooltipContent is only called on click
|
||||
loader.lazyRequireGetter(this, "setEventTooltip",
|
||||
"devtools/client/shared/widgets/tooltip/EventTooltipHelper", true);
|
||||
|
||||
/**
|
||||
* An implementation of MarkupContainer for Elements that can contain
|
||||
* child nodes.
|
||||
|
@ -49,6 +52,7 @@ MarkupElementContainer.prototype = Heritage.extend(MarkupContainer.prototype, {
|
|||
let listenerInfo = yield this.node.getEventListenerInfo();
|
||||
|
||||
let toolbox = this.markup.toolbox;
|
||||
|
||||
setEventTooltip(tooltip, listenerInfo, toolbox);
|
||||
// Disable the image preview tooltip while we display the event details
|
||||
this.markup._disableImagePreviewTooltip();
|
||||
|
|
Загрузка…
Ссылка в новой задаче