MCPcopy
hub / github.com/exceljs/exceljs / render

Method render

lib/xlsx/xform/style/protection-xform.js:18–39  ·  view source on GitHub ↗
(xmlStream, model)

Source from the content-addressed store, hash-verified

16 }
17
18 render(xmlStream, model) {
19 xmlStream.addRollback();
20 xmlStream.openNode('protection');
21
22 let isValid = false;
23 function add(name, value) {
24 if (value !== undefined) {
25 xmlStream.addAttribute(name, value);
26 isValid = true;
27 }
28 }
29 add('locked', validation.boolean(model.locked, true) ? undefined : '0');
30 add('hidden', validation.boolean(model.hidden, false) ? '1' : undefined);
31
32 xmlStream.closeNode();
33
34 if (isValid) {
35 xmlStream.commit();
36 } else {
37 xmlStream.rollback();
38 }
39 }
40
41 parseOpen(node) {
42 const model = {

Callers

nothing calls this directly

Calls 6

addRollbackMethod · 0.80
openNodeMethod · 0.80
closeNodeMethod · 0.80
rollbackMethod · 0.80
commitMethod · 0.65
addFunction · 0.50

Tested by

no test coverage detected