Skip to content

Fix: Change class attribute setting to classList.add - #851

Open
AnshukumarPal wants to merge 1 commit into
mdn:mainfrom
AnshukumarPal:main
Open

AnshukumarPal wants to merge 1 commit into
mdn:mainfrom
AnshukumarPal:main

Conversation

@AnshukumarPal

Copy link
Copy Markdown

The article's prose(step 3) instructs using para.classList.add("highlight"), but the accompanying code sample or finished sample below uses para.setAttribute('class', 'highlight');.

@AnshukumarPal
AnshukumarPal requested a review from a team as a code owner August 24, 2026 12:20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants