feat: handle input tags in getElementInfo
This commit is contained in:
@@ -182,7 +182,10 @@ export const getElementInformation = async (
|
|||||||
...info.attributes,
|
...info.attributes,
|
||||||
selectedValue: selectElement.value,
|
selectedValue: selectElement.value,
|
||||||
};
|
};
|
||||||
} else {
|
} else if (targetElement?.tagName === 'INPUT' && (targetElement as HTMLInputElement).type === 'time' || (targetElement as HTMLInputElement).type === 'date') {
|
||||||
|
info.innerText = (targetElement as HTMLInputElement).value;
|
||||||
|
}
|
||||||
|
else {
|
||||||
info.hasOnlyText = targetElement.children.length === 0 &&
|
info.hasOnlyText = targetElement.children.length === 0 &&
|
||||||
(targetElement.textContent !== null &&
|
(targetElement.textContent !== null &&
|
||||||
targetElement.textContent.trim().length > 0);
|
targetElement.textContent.trim().length > 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user