Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export function setupCounter(element) {

const setCounter = (count) => {
counter = count;
element.innerHTML = `count is ${counter}`;
element.textContent = `count is ${counter}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

1. Lesson solution mismatch 🐞 Bug ⚙ Maintainability

The Welcome lesson content and starter file still instruct updating innerHTML, but the lesson
solution now uses textContent, so the written guidance/code sample no longer matches the provided
solution. This can confuse learners and can cause “expected solution” drift if the platform compares
against _solution output/code.
Agent Prompt
## Issue description
The lesson text and starter code still reference `innerHTML`, while the updated solution uses `textContent`, creating inconsistent instructional materials.

## Issue Context
This PR changed the solution implementation to use `textContent`.

## Fix Focus Areas
- editron-starters/tutorialkit/src/content/tutorial/1-basics/1-introduction/1-welcome/content.md[19-34]
- editron-starters/tutorialkit/src/content/tutorial/1-basics/1-introduction/1-welcome/_files/counter.js[1-10]
- editron-starters/tutorialkit/src/content/tutorial/1-basics/1-introduction/1-welcome/_solution/counter.js[1-12]

## What to change
- Update `content.md` prose and the embedded code block to use `textContent` instead of `innerHTML` (and adjust wording accordingly).
- Consider updating `_files/counter.js` to also use `textContent` if the goal is to teach the safer pattern consistently (or alternatively revert `_solution/counter.js` back to `innerHTML` if that is intentional for the lesson).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

};

element.addEventListener('click', () => setCounter(counter + 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export function setupCounter(element) {

const setCounter = (count) => {
counter = count;
element.innerHTML = `count is ${counter}`;
element.textContent = `count is ${counter}`;
};

element.addEventListener('click', () => setCounter(counter + 1));
Expand Down