web-components. OpenPGPEmailRead

Custom HTML element that renders the decrypted content of an encrypted mail.
Wraps Mailvelope#createDisplayContainer for declarative use.

The armored PGP message is supplied either through a child
<template class="armored"> (preferred for multi-line bodies) or via the
data-armored attribute.

Fires:
  • event:ready - Dispatched once the decrypted container has been mounted.
  • error - Standard `ErrorEvent`. `event.error.code` may be any code raised by Mailvelope#createDisplayContainer — for example `DECRYPT_ERROR`, `ARMOR_PARSE_ERROR`, `PWD_DIALOG_CANCEL`, `NO_KEY_FOUND`.event:
Example
<openpgp-email-read id="msg" data-sender-address="alice@example.com">
  <template class="armored">-----BEGIN PGP MESSAGE-----
...
-----END PGP MESSAGE-----</template>
</openpgp-email-read>