Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using form.elements #22

Closed
LinusU opened this issue Jan 31, 2018 · 2 comments
Closed

Consider using form.elements #22

LinusU opened this issue Jan 31, 2018 · 2 comments

Comments

@LinusU
Copy link
Contributor

LinusU commented Jan 31, 2018

In some pages, that probably isn't technically proper HTML, the form tag can be prematurely closed and not have any children. In this case, there will still be input-elements linked to the form, and the form will submit just fine. However, using querySelectorAll on the form will always result in an empty result-set, since the form has no children.

It would be interesting to investigate an approach where we look at form.elements (which will hold all the inputs linked to the form) instead of using querySelectorAll on the form.

example site: http://www.aavtrain.com/create_user.asp

@perry-mitchell
Copy link
Member

This could most likely be accomplished by, as you said, using form.elements and then running Element.matches over all the items.

@perry-mitchell
Copy link
Member

Looking further into this, I think that sites such as moje.axa.cz (mentioned recently) have a form and elements but they're not linked - it's a good example that we need to remove our dependence on <form>s altogether. I'll close this in favour of a new issue: #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants