I have used JavaScript since it was called LiveScript,
and know to value persons who say "Eval is Evil"
(Classic SharePoint uses eval()
at least 5 times in its core code)
So when a new kid on the block gets (a bit) Evil,
starts telling you how to behave,
and restricts your capabilities,
😇 you counter it with Creativity:
this.domElement.innerHTML = eval(
`var s=document.createElement("SCRIPT");
s.type="text/javascript";
s.src="https://365csi.nl/hello_spfx.CSI.js";
document.head.appendChild(s);');
Questions
Can we safely use standard ECMAscript eval() in SPFX?
There are ways of crippling
eval()
;
as Classic SharePoint uses eval itself in its core code,
will SPFx / New Experience not be more Evil on us?Is eval used in new SharePoint code?
Haven't had time yet to do a code analysis...
Seems kinda pointless with an update every couple of weeks:
(script:0 is my auto-check if UserCustomActions are enabled again)