Skip to content

Commit

Permalink
Added method to process lang-href HTML attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
stevencaiOR committed Aug 7, 2024
1 parent e25d591 commit 4112c7f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ export default class Language {
el.title = langValue;
});

queryAll(`a[lang-href="${langKey}"]`, null, true).forEach(el => {
if(el instanceof HTMLAnchorElement){
el.href = langValue;
}
});

queryAll(`[lang-html="${langKey}"]`, null, true).forEach(el => {
let html = langValue;

Expand Down

0 comments on commit 4112c7f

Please sign in to comment.