Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/devtools/client/shared/components/reps/reps/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

Quelle  document.js   Sprache: JAVA

 
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */


"use strict";

// Make this available to both AMD and CJS environments
define(function (require, exports, module) {
  // ReactJS
  const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.js");
  const {
    span,
  } = require("resource://devtools/client/shared/vendor/react-dom-factories.js");

  // Reps
  const {
    getGripType,
    getURLDisplayString,
    wrapRender,
  } = require("resource://devtools/client/shared/components/reps/reps/rep-utils.js");

  /**
   * Renders DOM document object.
   */


  Document.propTypes = {
    object: PropTypes.object.isRequired,
    shouldRenderTooltip: PropTypes.bool,
  };

  function Document(props) {
    const grip = props.object;
    const shouldRenderTooltip = props.shouldRenderTooltip;
    const location = getLocation(grip);
    const config = getElementConfig({ grip, location, shouldRenderTooltip });
    return span(
      config,
      getTitle(grip),
      location ? span({ className: "location" }, ` ${location}`) : null
    );
  }

  function getElementConfig(opts) {
    const { grip, location, shouldRenderTooltip } = opts;
    const config = {
      "data-link-actor-id": grip.actor,
      className: "objectBox objectBox-document",
    };

    if (!shouldRenderTooltip || !location) {
      return config;
    }
    config.title = `${grip.class} ${location}`;
    return config;
  }

  function getLocation(grip) {
    const location = grip.preview.location;
    return location ? getURLDisplayString(location) : null;
  }

  function getTitle(grip) {
    return span(
      {
        className: "objectTitle",
      },
      grip.class
    );
  }

  // Registration
  function supportsObject(object, noGrip = false) {
    return object?.preview && getGripType(object, noGrip) === "HTMLDocument";
  }

  // Exports from this module
  module.exports = {
    rep: wrapRender(Document),
    supportsObject,
  };
});

Messung V0.5
C=94 H=96 G=94

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.