Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/browser/tools/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  mozsrcUriPlugin.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/. */


// This plugin supports finding files with particular resource:// URIs
// and translating the uri into a relative filesystem path where the file may be
// found when running within the Karma / Mocha test framework.

const path = require("path");

module.exports = {
  MozSrcUriPlugin: class MozSrcUriPlugin {
    /**
     * The base directory of the repository.
     */

    #baseDir;

    /**
     * @param {object} options
     *  Object passed during the instantiation of MozSrcUriPlugin
     * @param {string} options.baseDir
     *   The base directory of the repository.
     */

    constructor({ baseDir }) {
      this.#baseDir = baseDir;
    }

    apply(compiler) {
      compiler.hooks.compilation.tap(
        "MozSrcUriPlugin",
        (compilation, { normalModuleFactory }) => {
          normalModuleFactory.hooks.resolveForScheme
            .for("moz-src")
            .tap("MozSrcUriPlugin", resourceData => {
              const url = new URL(resourceData.resource);

              // path.join() is necessary to normalize the path on Windows.
              // Without it, the path may contain backslashes, resulting in
              // different build output on Windows than on Unix systems.
              const pathname = path.join(this.#baseDir, url.pathname);
              resourceData.path = pathname;
              resourceData.query = url.search;
              resourceData.fragment = url.hash;
              resourceData.resource = pathname + url.search + url.hash;
              return true;
            });
        }
      );
    }
  },
};

Messung V0.5 in Prozent
C=90 H=95 G=92

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.