MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / calcSignatureHeight

Method calcSignatureHeight

src/content-scripts/verifyFrame.js:35–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33 }
34
35 calcSignatureHeight() {
36 const treeWalker = document.createTreeWalker(this.pgpElement, NodeFilter.SHOW_TEXT, {
37 acceptNode(node) {
38 if (PGP_SIG_HEADER.test(node.textContent)) {
39 return NodeFilter.FILTER_ACCEPT;
40 }
41 return NodeFilter.FILTER_REJECT;
42 }
43 }, false);
44 const pgpSigBegin = treeWalker.nextNode();
45 this.pgpSigRange = pgpSigBegin.ownerDocument.createRange();
46 this.pgpSigRange.setStart(pgpSigBegin, pgpSigBegin.data.search(PGP_SIG_HEADER));
47 this.pgpSigRange.setEnd(this.pgpRange.endContainer, this.pgpRange.endOffset);
48 }
49
50 renderFrame() {
51 super.renderFrame();

Callers 1

initMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected