Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  stringbundle.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";

// This is loaded into chrome windows with the subscript loader. Wrap in
// a block to prevent accidentally leaking globals onto `window`.
{
  class MozStringbundle extends MozXULElement {
    get stringBundle() {
      if (!this._bundle) {
        try {
          this._bundle = Services.strings.createBundle(this.src);
        } catch (e) {
          dump("Failed to get stringbundle:\n");
          dump(e + "\n");
        }
      }
      return this._bundle;
    }

    set src(val) {
      this._bundle = null;
      this.setAttribute("src", val);
    }

    get src() {
      return this.getAttribute("src");
    }

    get strings() {
      // Note: this is a sucky method name! Should be:
      //       readonly attribute nsISimpleEnumerator strings;
      return this.stringBundle.getSimpleEnumeration();
    }

    getString(aStringKey) {
      try {
        return this.stringBundle.GetStringFromName(aStringKey);
      } catch (e) {
        dump(
          "*** Failed to get string " +
            aStringKey +
            " in bundle: " +
            this.src +
            "\n"
        );
        throw e;
      }
    }

    getFormattedString(aStringKey, aStringsArray) {
      try {
        return this.stringBundle.formatStringFromName(
          aStringKey,
          aStringsArray
        );
      } catch (e) {
        dump(
          "*** Failed to format string " +
            aStringKey +
            " in bundle: " +
            this.src +
            "\n"
        );
        throw e;
      }
    }
  }

  customElements.define("stringbundle", MozStringbundle);
}

Messung V0.5 in Prozent
C=93 H=93 G=92

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-05) ¤

*© 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik