Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Firefox/dom/workers/test/xpcshell/data/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 890 B image not shown  

Quelle  base_uri_module.mjs   Sprache: unbekannt

 
// This file is for testing the module loader's path handling.
// ESLint rules that modifies path shouldn't be applied.

export const obj = {};

export async function doImport() {
  // This file is loaded as resource://test/data/base_uri_module.mjs
  // Relative/absolute paths should be resolved based on the URI, instead of
  // file: path.

  const namespaceWithURI = await import(
    "resource://test/data/base_uri_module2.mjs"
  );
  const namespaceWithCurrentDir = await import("./base_uri_module2.mjs");
  const namespaceWithParentDir = await import("../data/base_uri_module2.mjs");
  const namespaceWithAbsoluteDir = await import("/data/base_uri_module2.mjs");

  return {
    equal1: namespaceWithURI.obj2 == namespaceWithCurrentDir.obj2,
    equal2: namespaceWithURI.obj2 == namespaceWithParentDir.obj2,
    equal3: namespaceWithURI.obj2 == namespaceWithAbsoluteDir.obj2,
  };
}

[ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet)  ]