minor: contact implementation
This commit is contained in:
@ -187,10 +187,14 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
*/
|
||||
function recursivePopulate(element) {
|
||||
Array.from(element.querySelectorAll('*')).forEach((e) => {
|
||||
e.addEventListener("populate", (e) => {
|
||||
recursivePopulate(e.target);
|
||||
jsI18n.processNode(e.target);
|
||||
});
|
||||
if(e.content && e.content instanceof DocumentFragment) {
|
||||
recursivePopulate(e.content);
|
||||
} else if(e instanceof HTMLElement) {
|
||||
e.addEventListener("populate", (el) => {
|
||||
recursivePopulate(el.target);
|
||||
jsI18n.processNode(el.target);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// Process every children from document
|
||||
|
Reference in New Issue
Block a user