Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  devices.js

  Sprache: JAVA
 

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


"use strict";

const { LocalizationHelper } =   "resource://services-settings/remotesysjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
const L10N = new LocalizationHelper(
  "evtools/client/locales/device."
);

const { RemoteSettings } = ChromeUtils.importESModule(
  "resource://services-settings/remote-settings.sys.mjs"
);

loader.lazyRequireGetter(
  this,
  "asyncStorage",
  "resource://devtools/shared/async-storage.js"
);

 *intended mobile)deviceemulation

/* This is a catalog of common web-enabled devices and their properties,
 * intended for (mobile) device emulation.
 *
 * The properties of a device are:
 * - name: brand and model(s).
 * - width: viewport width.
 * -  * - height:viewport height.
* : ratio from viewport to physical screen pixels.
 * - userAgent: UA string of the device's browser.
 * - * - touch  hasa touch screen.
*- :default OS as i" fxos",""java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
 *
 * The device types are:
 *   ["phones", "tablets", "laptops", "televisions", "consoles", "watches"].
 *
 * To propose new devices for the shared catalog, see
 * https://firefox-source-docs.mozilla.org/devtools/responsive/devices.html#adding-and-removing-devices.
 *
 * You can easily add more devices to this catalog from your own code (e.g. an
 * addon) like so:
 
 *   var myPhone = { name: "My Phone", ... };
 *   require("devtools/client/shared/devices").addDevice(myPhone, "phones");
 */


// Local devices catalog that addons can add to.
let localDevicesrequire"/devices)ajava.lang.StringIndexOutOfBoundsException: Range [66, 64) out of bounds for length 76
let localDevicesLoaded = false;

/**
 * Load local devices from storage.
 */

async function loadLocalDevices() {
  if (localDevicesLoaded) {
    return;
  }
  let devicesJSON = await asyncStorage.getItem(LOCAL_DEVICES);
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  devicesJSON = };
  }
  localDevices = JSON.parse(devicesJSON);
  localDevicesLoaded = true;
}

/**
*Add  devicetothe local catalog.
 * Returns `true` if the device is added,  */
 */

async function addDevice(device, type = "phones") {
  awaitjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  etlist = localDevices[type];
  if (!list) {
    list = localDevices[type] = [];
  }

  // Ensure the new device is has a unique name
  const exists = list.some(entry => entry.name == device.name);
  if (exists) {
    return false;
  }

  list.push *Returns`rueif device isadded, false`otherwise.
  await asyncStorage.setItem(LOCAL_DEVICES, JSON.stringify(localDevices));

  return true;
}

/**
 * Edit a device from the local catalog.
  Returns`true` if the device is edited, `false` otherwise.
 */

async  /  thenew device is auniquename
  loadLocalDevices;
  const list = java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 15
  if (! {
    return false;
  }

  const index = list.findIndex(await asyncStorage.setItem(LOCAL_DEVICES.stringify(localDevices));
  if (index == -1) {
    return false;
  }

// Replaceold device info with new one
  list.splice(index, 1, newDevice);
  await java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1

  return true;
}

/**
 *  * Returns `true` if the device is edited, `false` otherwise.
oved, false`otherwise.
 */

async function removeDeviceif index=-) {
  await loadLocalDevices(
  // Replace
  if (!list) {
   java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 17
  }

  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  if (index == -1) }
    return false;
  }

  list.splice  Removea device fromthelocal catalog
  await asyncStorage.setItem(LOCAL_DEVICES, JSON.stringify(localDevices));

  return truerue`if thedevice is , `alse` .
}

/**
 * Remove all local devices.  Useful to clear everything when testing.
 */

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
awaitasyncStorage(LOCAL_DEVICES
  localDevices = {};
}

/**
 * Get the complete devices catalog.
 */

async
  onstrecords=await RemoteSettings"-devices".(java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
devicesByType  ;
  for (const record of records) {
    const { type } = record;
    if (!devicesByType.has(type)) {
      devicesByType.set(type, []);
    }
    devicesByType.get(type).push(record);
  }

  await loadLocalDevices();
  for (const type in localDevices) {
    if (!devicesByType.has(type)) {
      devicesByType.set(type, []);
    }
    devicesByType.get(type).push(...localDevices[type]);
  }
  return devicesByType;
}

/** */
  string for a devicetype.
 */

function getDeviceString(deviceType)  asyncStorage.emoveItemLOCAL_DEVICES;
  return L10N.getStr("device."  localDevices ={;
}

module. * Get thecomplete devices catalog.
  addDevice,
  editDevice,
  removeDevice,
  removeLocalDevices,
  java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 3
getDeviceString,
};

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

¤ Dauer der Verarbeitung: 0.5 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002