From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- .../checkinstalled/index.html | 49 ------------ .../getinstalled/index.html | 40 ---------- .../es/web/api/domapplicationsregistry/index.html | 89 --------------------- .../api/domapplicationsregistry/install/index.html | 90 ---------------------- .../installpackage/index.html | 36 --------- 5 files changed, 304 deletions(-) delete mode 100644 files/es/web/api/domapplicationsregistry/checkinstalled/index.html delete mode 100644 files/es/web/api/domapplicationsregistry/getinstalled/index.html delete mode 100644 files/es/web/api/domapplicationsregistry/index.html delete mode 100644 files/es/web/api/domapplicationsregistry/install/index.html delete mode 100644 files/es/web/api/domapplicationsregistry/installpackage/index.html (limited to 'files/es/web/api/domapplicationsregistry') diff --git a/files/es/web/api/domapplicationsregistry/checkinstalled/index.html b/files/es/web/api/domapplicationsregistry/checkinstalled/index.html deleted file mode 100644 index 5c2d298aa9..0000000000 --- a/files/es/web/api/domapplicationsregistry/checkinstalled/index.html +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: Apps.checkInstalled -slug: Web/API/DOMApplicationsRegistry/checkInstalled -tags: - - API - - Apps - - Apps API - - Firefox OS - - Procedimiento -translation_of: Archive/Marketplace/API/DOMApplicationsRegistry/checkInstalled ---- -

{{ ApiRef() }}

-

{{ non-standard_header() }}

-

Resúmen

-

Obtiene información acerca de la aplicación dada. Esto puede ser usado para determinar si se ha instalado la aplicación.

-

Sintaxis

-
var request = window.navigator.mozApps.checkInstalled(url);
-
-

Parámetros

-
-
- url
-
- Una cadena de URL que contiene la ubicación de el manifiesto de la aplicación.
-
-

Resultados

-

La función checkInstalled() devuelve un objeto {{ domxref("DOMRequest") }}. La propiedad DOMRequest.result contiene un App object, que es un objeto JavaScript que describe la aplicación instalada. Si la aplicación no se encuentra instalada, entonces DOMRequest.result es null (nulo).

-

Ejemplo

-
var request = window.navigator.mozApps.checkInstalled("http://ejemplo.com/manifest.webapp");
-request.onerror = function(e) {
-  alert("Error de llamada checkInstalled: " + request.error.name);
-};
-request.onsuccess = function(e) {
-  if (request.result) {
-    console.log("La aplicación está instalada!");
-  }
-  else {
-    console.log("La aplicación no está instalada!");
-  }
-};
-

Se espera a las personas que llaman para establecer las propiedades de devolución de llamada onsuccess y onerror del objeto devuelto, como se muestra en este ejemplo. Si la llamada se realiza correctamente,  un App object se devuelve en la propiedad result del objeto devuelto. En el ejemplo esto es request.result.

-

Errores

-

La cadena ERROR pueden ser devueltos en DOMRequest.error.

-

Una excepción NS_ERROR_DOM_BAD_URI se produce si el manifiesto está en un dominio diferente a la página en que se solicita la información. Este se produce tan pronto como se invoca checkInstalled.

-

Temas relacionados

- diff --git a/files/es/web/api/domapplicationsregistry/getinstalled/index.html b/files/es/web/api/domapplicationsregistry/getinstalled/index.html deleted file mode 100644 index a1b96ee7ff..0000000000 --- a/files/es/web/api/domapplicationsregistry/getinstalled/index.html +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: Apps.getInstalled -slug: Web/API/DOMApplicationsRegistry/getInstalled -tags: - - API - - Apps - - Apps API - - Firefox OS - - Procedimiento -translation_of: Archive/Marketplace/API/DOMApplicationsRegistry/getInstalled ---- -

{{ ApiRef() }}

-

{{ non-standard_header() }}

-

Resumen

-

Obtenga una lista de todas las aplicaciones instaladas desde este origen. Por ejemplo, si se llama a esto en el Firefox Marketplace, obtendrá la lista de aplicaciones instaladas por el Firefox Marketplace.

-
-

Note: Múltiples aplicaciones por origen no son compatibles. Para alojar varias aplicaciones de un dominio, establezca un subdominio para cada aplicación; por ejemplo: miapp.midominio.com, otraapp.midominio.com, y así sucesivamente.

-
-

Sintaxis

-
var request = window.navigator.mozApps.getInstalled();
-
-

Parámetros

-

Ninguno.

-

Ejemplo

-
var request = window.navigator.mozApps.getInstalled();
-request.onerror = function(e) {
-  alert("Error de llamada getInstalled: " + request.error.name);
-};
-request.onsuccess = function(e) {
-  alert("Éxito, numero de apps: " + request.result.length);
-  var appsRecord = request.result;
-};
-

Se espera a las personas que llaman para establecer las propiedades de devolución onsuccess y onerror del objeto devuelto, como se muestra en este ejemplo. Si la llamada se realiza correctamente un array de App objects se devuelve en la propiedad result del objeto devuelto. En el ejemplo esto es request.result.

-

Errores

-

La cadena ERROR puede ser devuelta en DOMRequest.error.

-

Temas relacionados

- diff --git a/files/es/web/api/domapplicationsregistry/index.html b/files/es/web/api/domapplicationsregistry/index.html deleted file mode 100644 index e9d68ecf20..0000000000 --- a/files/es/web/api/domapplicationsregistry/index.html +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: DOMApplicationsRegistry -slug: Web/API/DOMApplicationsRegistry -tags: - - API - - Apps - - B2G - - Firefox OS - - No estandar - - Referencia -translation_of: Archive/Marketplace/API/DOMApplicationsRegistry ---- -

{{ ApiRef("Apps") }}

- -

{{ non-standard_header() }}

- -

Provides support for installing, managing, and controlling Open Web apps in a browser. Currently implemented as {{ domxref('window.navigator.mozApps') }}.

- -

Propiedad

- -
-
{{domxref("DOMApplicationsRegistry.mgmt")}}
-
Un objeto mgmt que define funciones que le permiten a los tableros manejar y arrancar apps  a favor del usuario.
-
- -

Metodos

- -
-
{{ domxref("DOMApplicationsRegistry.checkInstalled()") }}
-
Verifica cuando una app se ha instalado tomando el manifiesto como su parametro.
-
{{ domxref("DOMApplicationsRegistry.install()") }}
-
Desencade la instalación de una app. Durante el proceso de instalación, la app es validada y se le pregunta al usuario si desea aprovar la instalación.
-
{{ domxref("DOMApplicationsRegistry.getSelf()") }}
-
Returna un objeto que contiene un {{ domxref('app') }} para la app.
-
{{ domxref("DOMApplicationsRegistry.getInstalled()") }}
-
Obtine una lista de todas las apps instaladas.
-
- -

Compatibilidad de navegadores

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Soporte basico{{ CompatUnknown() }}16.0{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
-
- -
- - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Soporte basico{{ CompatUnknown() }}16.0{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
-
- -

 

diff --git a/files/es/web/api/domapplicationsregistry/install/index.html b/files/es/web/api/domapplicationsregistry/install/index.html deleted file mode 100644 index 56f18e777b..0000000000 --- a/files/es/web/api/domapplicationsregistry/install/index.html +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Apps.install -slug: Web/API/DOMApplicationsRegistry/install -translation_of: Archive/Marketplace/API/DOMApplicationsRegistry/install ---- -
- {{ ApiRef() }} {{non-standard_header}}
-

Resumen

-

Activa la instalación de una aplicación. Durante este proceso la aplicación es validada y el usuario se le solicita aprovar la instalación .

-

Si la aplicación estaba previamente instalada desde el mismo dominio, llamando install()otra vez puede silenciosamente reescribir los datos de instalación. This can be used to modify the purchase receipt, for example, when a user upgrades from a free app to a premium app.

-

Syntax

-
var request = window.navigator.mozApps.install(url, [receipt1, …]);
-

Parameters

-
- Note: There is currently (May 2012) a bug with passing a relative path in the url parameter. See {{ Bug("745928") }}.
-
-
- url
-
- A string URL containing the location of the manifest to be installed. In the case of self distribution (where the installing origin is the same as the app origin), the installing site may omit the origin part of the URL and provide an absolute path (beginning with /).
-
- receipts
-
- (Optional) An array of one or more receipts. Example:
-
-
window.navigator.mozApps.install(url, ["receipt"])
-
-
- If receipts is omitted it is treated as null. For more information see Validating a receipt.
-
-

The install() function throws an exception if the required argument (url) is missing, or if unsupported arguments are present.

-

Returns

-

The install() function returns a {{ domxref("DOMRequest") }} object. The DOMRequest.result field contains an App object, which is a JavaScript object that describes the app that was just installed. Before the operation is finished, DOMRequest.result is null.

-

If the installation is not successful, DOMRequest.error contains a DOMError object, which has information about the error.

-

Example

-

An example that shows how to use install() with the DOMRequest.onsuccess and DOMRequest.onerror callback properties.

-
var request = window.navigator.mozApps.install(manifestUrl);
-request.onsuccess = function () {
-  // Save the App object that is returned
-  var appRecord = this.result;
-  alert('Installation successful!');
-};
-request.onerror = function () {
-  // Display the error information from the DOMError object
-  alert('Install failed, error: ' + this.error.name);
-};
-
-

The onsuccess callback is called if the installation is successful. This means that the installation actions described here have occurred.

-

If the installation is not successful the onerror callback is called. On a failed installation, DOMRequest.error contains a DOMError object that has information about the error.

-

The code above may look unusual to you, with listeners being added after the function has already been invoked. However, this is the way the DOMRequest object operates. The function invocation will wait until the listeners are defined, and then the listeners will fire appropriately. The install() function also works by itself, without the .onsuccess and .onerror listeners.

-

Errors

-

When the installation is unsuccessful, one of the following errors can be returned in DOMRequest.error.

-
-
- DENIED
-
- The user cancelled the installation.
-
- INVALID_MANIFEST
-
- The manifest, while well-formed JSON, does not have some required field or is somehow invalid.
-
- MANIFEST_URL_ERROR
-
- Something other than an HTTP 200 status code was received, or some connection errors.
-
- MANIFEST_PARSE_ERROR
-
- Bad JSON in the manifest.
-
- NETWORK_ERROR
-
- Connection error.
-
- REINSTALL_FORBIDDEN
-
- Reinstalls of apps are forbidden.
-
- MULTIPLE_APPS_PER_ORIGIN_FORBIDDEN
-
- Installable apps have a "single app per origin" security policy; basically, you can't host more than one installable app per origin.
-
- - diff --git a/files/es/web/api/domapplicationsregistry/installpackage/index.html b/files/es/web/api/domapplicationsregistry/installpackage/index.html deleted file mode 100644 index c269240c60..0000000000 --- a/files/es/web/api/domapplicationsregistry/installpackage/index.html +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: Apps.installPackage -slug: Web/API/DOMApplicationsRegistry/installPackage -translation_of: Archive/Marketplace/API/DOMApplicationsRegistry/installPackage ---- -
- {{ApiRef}} {{non-standard_header}}
-

Resumen

-

Instala una aplicación empaquetada.

-
- Solo disponible en Firefox OS.
-

Sintaxis

-
installPackage: function(aURL[, aParams])
-

Parametros

- -

Resultados

-
-
- aURL
-
- El URL del paquete de aplicación a instalar. Esta debe ser una URL completa y absoluta.
-
- aParams
-
- Opcionalmente, un objeto con información adicional:
-
- DOMRequest
-
-

Véase también

- -- cgit v1.2.3-54-g00ecf