MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / displayContainer

Function displayContainer

src/content-scripts/clientAPI.js:149–163  ·  view source on GitHub ↗
({selector, armored, keyringId, options = {}})

Source from the content-addressed store, hash-verified

147}
148
149function displayContainer({selector, armored, keyringId, options = {}}) {
150 let container;
151 switch (getMessageType(armored)) {
152 case PGP_MESSAGE:
153 container = new DecryptContainer(selector, keyringId, options);
154 break;
155 case PGP_SIGNATURE:
156 throw new MvError('PGP signatures not supported.', 'WRONG_ARMORED_TYPE');
157 case PGP_PUBLIC_KEY:
158 throw new MvError('PGP keys not supported.', 'WRONG_ARMORED_TYPE');
159 default:
160 throw new MvError('No valid armored block found.', 'WRONG_ARMORED_TYPE');
161 }
162 return container.create(armored);
163}
164
165function editorContainer({selector, keyringId, options = {}}) {
166 if (options.quotedMailIndent === undefined && !options.armoredDraft) {

Callers

nothing calls this directly

Calls 2

getMessageTypeFunction · 0.90
createMethod · 0.45

Tested by

no test coverage detected