Demo/bin/Debug/front_end/settings/FrameworkBlackboxDialog.js

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
 * Copyright 2014 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.DialogDelegate}
 */
WebInspector.FrameworkBlackboxDialog = function()
{
    WebInspector.DialogDelegate.call(this);
    this.element.classList.add("blackbox-dialog", "dialog-contents");

    var header = this.element.createChild("div", "header");
    header.createChild("span").textContent = WebInspector.UIString("Framework blackbox patterns");

    var closeButton = header.createChild("div", "done-button", "dt-close-button");
    closeButton.gray = true;
    closeButton.addEventListener("click", this._onDoneClick.bind(this), false);

    var contents = this.element.createChild("div", "contents");

    var contentScriptsSection = contents.createChild("div", "blackbox-content-scripts");
    contentScriptsSection.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIString("Blackbox content scripts"), WebInspector.moduleSetting("skipContentScripts"), true));

    var blockHeader = contents.createChild("div", "columns-header");
    blockHeader.createChild("span").textContent = WebInspector.UIString("URI pattern");
    blockHeader.createChild("span").textContent = WebInspector.UIString("Behavior");

    var section = contents.createChild("div", "section");
    var container = section.createChild("div", "settings-list-container");

    this._blackboxLabel = WebInspector.UIString("Blackbox");
    this._disabledLabel = WebInspector.UIString("Disabled");

    var column1 = { id: "pattern", placeholder: "/framework\\.js$" };
    var column2 = { id: "value", options: [this._blackboxLabel, this._disabledLabel] };

    this._patternsList = new WebInspector.EditableSettingsList([column1, column2], this._patternValuesProvider.bind(this), this._patternValidate.bind(this), this._patternEdit.bind(this));
    this._patternsList.element.classList.add("blackbox-patterns-list");
    this._patternsList.addEventListener(WebInspector.SettingsList.Events.Removed, this._patternRemovedFromList.bind(this));
    container.appendChild(this._patternsList.element);

    /** @type {!Map.<string, string>} */
    this._entries = new Map();
    var patterns = WebInspector.moduleSetting("skipStackFramesPattern").getAsArray();
    for (var i = 0; i < patterns.length; ++i)
        this._addPattern(patterns[i].pattern, patterns[i].disabled);

    this.element.tabIndex = 0;
}

WebInspector.FrameworkBlackboxDialog.show = function(element)
{
    var dialog = new WebInspector.FrameworkBlackboxDialog();
    WebInspector.Dialog.show(element, dialog);
    var glassPane = dialog.element.ownerDocument.getElementById("glass-pane");
    glassPane.classList.add("settings-glass-pane");
后面还有 180 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。