Demo/bin/Debug/front_end/sources/XHRBreakpointsSidebarPane.js
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @constructor
* @extends {WebInspector.BreakpointsSidebarPaneBase}
* @implements {WebInspector.TargetManager.Observer}
*/
WebInspector.XHRBreakpointsSidebarPane = function()
{
WebInspector.BreakpointsSidebarPaneBase.call(this, WebInspector.UIString("XHR Breakpoints"));
this._xhrBreakpointsSetting = WebInspector.settings.createLocalSetting("xhrBreakpoints", []);
/** @type {!Map.<string, !Element>} */
this._breakpointElements = new Map();
var addButton = new WebInspector.ToolbarButton(WebInspector.UIString("Add breakpoint"), "add-toolbar-item");
addButton.addEventListener("click", this._addButtonClicked.bind(this));
this.toolbar().appendToolbarItem(addButton);
this.emptyElement.addEventListener("contextmenu", this._emptyElementContextMenu.bind(this), true);
WebInspector.targetManager.observeTargets(this);
}
WebInspector.XHRBreakpointsSidebarPane.prototype = {
/**
* @override
* @param {!WebInspector.Target} target
*/
targetAdded: function(target)
{
this._restoreBreakpoints(target);
},
/**
* @override
* @param {!WebInspector.Target} target
*/
targetRemoved: function(target) { },
_emptyElementContextMenu: function(event)
{
var contextMenu = new WebInspector.ContextMenu(event);
contextMenu.appendItem(WebInspector.UIString.capitalize("Add ^breakpoint"), this._addButtonClicked.bind(this));
contextMenu.show();
},
_addButtonClicked: function(event)
{
if (event)
event.consume();
this.expand();
var inputElementContainer = createElementWithClass("p", "breakpoint-condition");
inputElementContainer.textContent = WebInspector.UIString("Break when URL contains:");
var inputElement = inputElementContainer.createChild("span", "editing");
后面还有 195 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。