Skip to content

Commit

Permalink
Updated language-dir comments
Browse files Browse the repository at this point in the history
  • Loading branch information
henrykaus committed Oct 19, 2024
1 parent 8e21b74 commit ea50f9e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/language-dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ const setLangDirection = (event) => {
}

/**
* Function called when the html attributes change
* Function called when the html attributes change and sets the language
* direction as needed.
*
* @param {MutationRecord[]} mutationsList
*/
const langMutationCallback = (mutationsList) => {
for (const mutation of mutationsList) {
if (mutation.type === "attributes" && mutation.attributeName === "lang") {
if (mutation.type === 'attributes' && mutation.attributeName === 'lang') {
setLangDirection();
}
}
Expand Down

0 comments on commit ea50f9e

Please sign in to comment.