INNER CODE UNIT · Python
getRoot
gurkenlabs/litiengine · config/javadoc/generate_js.py:20
function getRoot() {
if (typeof pathtoroot !== 'undefined' && pathtoroot) return pathtoroot;
if (window.pathtoroot) return window.pathtoroot;
const script = document.querySelector('script[src*="litiengine.js"]');
if (script) {
const src = script.getAttribute('src');
return src.substring(0, src.indexOf('script-files/litiengine.js'));
}
return '';
}
function getStoredTheme() {
try {
return localStorage.getItem('liti-theme');
} catch (e) {
return null;
}
}