Firefox Tomorrow

web api instance method

CrashReportContext: delete() method

View on MDN ↗

Available in workersLimited availability

The delete() method of the CrashReportContext interface deletes a previously-stored key-value pair.

Syntax

delete(key)

Parameters

  • key
    • : A string representing the key of the key-value pair to be deleted.

Return value

None (undefined).

Exceptions

  • InvalidStateError DOMException
    • : Thrown if:
      • The calling document is not fully active.
      • The crash report key-value store is not yet initialized via an initialize() call.

Examples

Basic usage

window.crashReport.initialize(1024).then(() => {
  // Set a possible crash-causing value, and try
  // running an operation that may cause a crash
  window.crashReport.set("crash-arg", "00031");
  operationThatMightCrash("00031");
  // Delete the key-value pair if it doesn't cause a crash
  window.crashReport.delete("crash-arg");
});

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also