INNER CODE UNIT · Python
cleanInheritanceTree
gurkenlabs/litiengine · config/javadoc/generate_js.py:583
function cleanInheritanceTree() {
const rootInheritance = document.querySelector('main > div.inheritance');
if (!rootInheritance) return;
// Collect chain of nodes from root down to leaf
const items = [];
let current = rootInheritance;
while (current) {
const link = Array.from(current.children).find(el => el.tagName === 'A');
if (link) {
const fullText = link.textContent.trim();
const isObject = link.href.includes('Object.html') || fullText === 'java.lang.Object' || fullText === 'Object';
const lastDot = fullText.lastIndexOf('.');
const pkg = lastDot !== -1 ? fullText.substring(0, lastDot) : '';
const name = lastDot !== -1 ? fullText.substring(lastDot + 1) : fullText;
items.push({
isObject,