MCPcopy
hub / github.com/mailvelope/mailvelope / createDisplayContainer

Method createDisplayContainer

src/client-API/client-api.js:95–107  ·  view source on GitHub ↗

* Creates an iframe to display the decrypted content of the encrypted mail. * The iframe will be injected into the container identified by selector. * @param {CssSelector} selector - target container * @param {AsciiArmored} armored - the encrypted mail to display * @param {Keyring} [keyr

(selector, armored, keyring, options)

Source from the content-addressed store, hash-verified

93 * @returns {Promise.<DisplayContainer, Error>}
94 */
95 createDisplayContainer(selector, armored, keyring, options) {
96 try {
97 checkTypeKeyring(keyring);
98 } catch (e) {
99 return Promise.reject(e);
100 }
101 return send('display-container', {selector, armored, identifier: keyring && keyring.identifier, options}).then(display => {
102 if (display && display.error) {
103 display.error = mapError(display.error);
104 }
105 return display;
106 });
107 }
108
109 /**
110 * @typedef {Object} EditorContainerOptions

Callers 1

createContainerMethod · 0.80

Calls 4

checkTypeKeyringFunction · 0.85
rejectMethod · 0.80
sendFunction · 0.70
mapErrorFunction · 0.70

Tested by

no test coverage detected