MCPcopy
hub / github.com/mailvelope/mailvelope / attachEncryptFrame

Function attachEncryptFrame

src/content-scripts/main.js:332–340  ·  view source on GitHub ↗

* attach encrypt frame to element * @param {Array} elements

(elements)

Source from the content-addressed store, hash-verified

330 * @param {Array} elements
331 */
332function attachEncryptFrame(elements) {
333 // filter out attached and detached frames
334 elements = elements.filter(element => !isAttached(element));
335 // create new encrypt frames for new discovered editable fields
336 elements.forEach(element => {
337 const eFrame = new EncryptFrame();
338 eFrame.attachTo(element);
339 });
340}
341
342export function isAttached(element) {
343 if (!element) {

Callers 1

scanDOMFunction · 0.85

Calls 2

attachToMethod · 0.95
isAttachedFunction · 0.85

Tested by

no test coverage detected