children,
counter: 0,
depth: 1,
+ identifier: false,
title,
};
});
children,
counter: 0,
depth: 2,
+ identifier: false,
link: link.href,
title: link.textContent!,
};
children: [],
counter: 0,
depth: 2,
+ identifier: false,
link: action.href,
title: action.dataset.tooltip || action.title,
};
children,
counter: 0,
depth: 0,
+ identifier: false,
title,
};
},
const active = menuItem.classList.contains("active");
+ const identifier = anchor.parentElement!.dataset.identifier!;
+
return {
active,
children,
counter,
depth,
+ identifier,
link,
title,
};
children: MenuItem[];
counter: number;
depth: MenuItemDepth;
+ identifier: string | false;
link?: string;
title: string;
};
children,
counter: 0,
depth: 1,
+ identifier: false,
title,
};
});
children,
counter: 0,
depth: 2,
+ identifier: false,
link: link.href,
title: link.textContent,
};
children: [],
counter: 0,
depth: 2,
+ identifier: false,
link: action.href,
title: action.dataset.tooltip || action.title,
};
children,
counter: 0,
depth: 0,
+ identifier: false,
title,
};
});
link = anchor.href;
}
const active = menuItem.classList.contains("active");
+ const identifier = anchor.parentElement.dataset.identifier;
return {
active,
children,
counter,
depth,
+ identifier,
link,
title,
};