// Установка обработчиков для уже существующих полей document.querySelectorAll('input, textarea').forEach(function(input) { addInputEventHandlers(input); }); // Отслеживание изменений в DOM для новых элементов var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { mutation.addedNodes.forEach(function(node) { if (node.tagName === 'INPUT' || node.tagName === 'TEXTAREA') { addInputEventHandlers(node); } // Также обработаем случаи, когда новые элементы содержат вложенные input или textarea if (node.nodeType === Node.ELEMENT_NODE) { node.querySelectorAll('input, textarea').forEach(function(input) { addInputEventHandlers(input); }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); });
sroll down
heading
Click "Block Editor" to enter the edit mode. Use layers, shapes and customize adaptability. Everything is in your hands.
heading
Click "Block Editor" to enter the edit mode. Use layers, shapes and customize adaptability. Everything is in your hands.