Demo/bin/Debug/front_end/sources/JavaScriptBreakpointsSidebarPane.js
(开头部分) 9KB这里只显示每个文件的开头 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.SidebarPane}
* @param {!WebInspector.BreakpointManager} breakpointManager
* @param {function(!WebInspector.UISourceCode, number=, number=, boolean=)} showSourceLineDelegate
*/
WebInspector.JavaScriptBreakpointsSidebarPane = function(breakpointManager, showSourceLineDelegate)
{
WebInspector.SidebarPane.call(this, WebInspector.UIString("Breakpoints"));
this.registerRequiredCSS("components/breakpointsList.css");
this._breakpointManager = breakpointManager;
this._showSourceLineDelegate = showSourceLineDelegate;
this.listElement = createElementWithClass("ol", "breakpoint-list");
this.emptyElement = this.element.createChild("div", "info");
this.emptyElement.textContent = WebInspector.UIString("No Breakpoints");
this._items = new Map();
var breakpointLocations = this._breakpointManager.allBreakpointLocations();
for (var i = 0; i < breakpointLocations.length; ++i)
this._addBreakpoint(breakpointLocations[i].breakpoint, breakpointLocations[i].uiLocation);
this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointAdded, this._breakpointAdded, this);
this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointRemoved, this._breakpointRemoved, this);
this.emptyElement.addEventListener("contextmenu", this._emptyElementContextMenu.bind(this), true);
}
WebInspector.JavaScriptBreakpointsSidebarPane.prototype = {
_emptyElementContextMenu: function(event)
{
var contextMenu = new WebInspector.ContextMenu(event);
this._appendBreakpointActiveItem(contextMenu);
contextMenu.show();
},
/**
* @param {!WebInspector.ContextMenu} contextMenu
*/
_appendBreakpointActiveItem: function(contextMenu)
{
var breakpointActive = this._breakpointManager.breakpointsActive();
var breakpointActiveTitle = breakpointActive ?
WebInspector.UIString.capitalize("Deactivate ^breakpoints") :
WebInspector.UIString.capitalize("Activate ^breakpoints");
contextMenu.appendItem(breakpointActiveTitle, this._breakpointManager.setBreakpointsActive.bind(this._breakpointManager, !breakpointActive));
},
/**
* @param {!WebInspector.Event} event
*/
_breakpointAdded: function(event)
{
后面还有 191 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。