Merge pull request #273 from getmaxun/input-sel

feat: selection for `<input>` tags
This commit is contained in:
Karishma Shukla
2024-12-20 17:28:52 +05:30
committed by GitHub

View File

@@ -61,6 +61,8 @@ export const getElementInformation = async (
...info.attributes, ...info.attributes,
selectedValue: selectElement.value, selectedValue: selectElement.value,
}; };
} else if (element?.tagName === 'INPUT' && (element as HTMLInputElement).type === 'time' || (element as HTMLInputElement).type === 'date') {
info.innerText = (element as HTMLInputElement).value;
} else { } else {
info.hasOnlyText = element?.children?.length === 0 && info.hasOnlyText = element?.children?.length === 0 &&
element?.innerText?.length > 0; element?.innerText?.length > 0;