Open Bored0ne opened 6 years ago
It currently does support button. That said if you pull this locally and install it as a developer package, you can change it to register clicks on everything. Something like this:
start () {
const typeableElements = document.querySelectorAll('input, textarea')
- const clickableElements = document.querySelectorAll('a, button')
for (let i = 0; i < typeableElements.length; i++) {
typeableElements[i].addEventListener('keydown', this.handleKeydown)
}
+ document.addEventListener('click', this.handleClick)
- for (let i = 0; i < clickableElements.length; i++) {
- clickableElements[i].addEventListener('click', this.handleClick)
- }
}
Wow I'm just seeing this. Yes that would work way better. Do people not want this by default?
Actually, it should probably be tweaked more. The current pattern doesn't support elements that were created after the recording started. Will have to play with it more.
Not sure about it being defaulted. 😕
This appears to only support standard "input" elements. Would it not be possible to bind to the value changed event for inputs to handle support for things like checkboxes or input buttons? I'm using this to test asp webforms and the default button is an and this isn't picking up their clicks. This could support the following list of types fairly easily. https://www.w3schools.com/tags/att_input_type.asp