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

Fix action getter #2

Merged
merged 1 commit into from
Sep 22, 2019
Merged

Fix action getter #2

merged 1 commit into from
Sep 22, 2019

Conversation

AugustMiller
Copy link
Contributor

This should address my clumsy issue report #1, which ultimately was caused by having an input with name="action" clobbering the normal form.action behavior.

That cascaded down to the Link class being initialized with an input element instead of a URI/string… anyway, here we are!

All this does is swap out the magic form.action getter with form.getAttribute('action') so it will always fetch the value of the HTML attribute and bypass any elements of the same name.

@gmrchk gmrchk merged commit 75ef61f into swup:master Sep 22, 2019
@gmrchk
Copy link
Member

gmrchk commented Sep 22, 2019

Very nice catch! I've tried to search for any reference about this behavior in specs (here or here) but could find anything. I guess browsers just choose to do this on their own.

Anyway, I've added the same for method attribute and added defaults. Thanks for your work on this!

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

Successfully merging this pull request may close these issues.

None yet

2 participants