Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function load_onprem(ready, path) {
var p = path || "/_layouts/15/",
spVersion = parseInt(_spPageContextInfo.siteClientTag.match(/\$\$(\d{2})\./i)[1], 10);
if (spVersion >= 16 && (typeof (g_all_modules) == "undefined"
|| typeof (g_all_modules["ms.rte.js"]) == "undefined")
&& $("#msrtejs").length == 0) {
$('