MCPcopy Index your code
hub / github.com/nilbuild/developer-roadmap / populate

Method populate

src/components/InteractiveRoadmap/topic.js:74–89  ·  view source on GitHub ↗

* @param {string | HTMLElement} html

(html)

Source from the content-addressed store, hash-verified

72 * @param {string | HTMLElement} html
73 */
74 populate(html) {
75 this.contentEl.replaceChildren(html);
76 this.loaderEl.classList.add('hidden');
77 this.topicActionsEl.classList.remove('hidden');
78
79 const normalizedGroup = (this.activeTopicId || '').replace(/^\d+-/, '');
80 const isDone = localStorage.getItem(normalizedGroup) === 'done';
81
82 if (isDone) {
83 this.markTopicDoneEl.classList.add('hidden');
84 this.markTopicPendingEl.classList.remove('hidden');
85 } else {
86 this.markTopicDoneEl.classList.remove('hidden');
87 this.markTopicPendingEl.classList.add('hidden');
88 }
89 }
90
91 fetchTopicHtml(roadmapId, topicId) {
92 const topicPartial = topicId.replace(/^\d+-/, '').replaceAll(/:/g, '/');

Callers 1

handleTopicClickMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected