-
Notifications
You must be signed in to change notification settings - Fork 28
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
client1 + client2: Fix onsubmit
event handler to allow submitting forms
#462
Conversation
@SmithChart: Nice! Can you add a test too? |
Codecov ReportPatch coverage has no change and project coverage change:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #462 +/- ##
==========================================
+ Coverage 71.81% 71.92% +0.10%
==========================================
Files 84 84
Lines 5745 5745
Branches 1235 1235
==========================================
+ Hits 4126 4132 +6
+ Misses 1339 1336 -3
+ Partials 280 277 -3 ☔ View full report in Codecov by Sentry. |
Since tests rely on Docker I am not sure if I can actually run the tests anywhere. I'll look into that. |
eb33388
to
a684c7b
Compare
@fscherf please have another look. I've added a test. But I am not sure if it should be put somewhere specific into the ordered block. From my point of this looks OK :-) |
@SmithChart: Nice! I refactored your test a bit (https://github.com/lona-web-org/lona/tree/fscherf/fix-post-requests) |
According to the documentation (https://lona-web.org/1.x/api-reference/views.html#post ) it should be possible to submit a `<form>` using `POST` to an interactive lona view. Without this change this fails with a `Uncaught ReferenceError: lona_window is not defined` in the browser. This change fixes the missing reference and allows to use the `POST` method to submit data to the view. (Also add a test to make sure a POSTed `<form>` still works in the future.) Signed-off-by: Chris Fiege <cfi@pengutronix.de>
@fscherf: I have squashed your suggested changes. Thanks for the update! |
@SmithChart: Great! Thanks for contributing! |
According to the documentation
(https://lona-web.org/1.x/api-reference/views.html#post ) it should be possible to submit a
<form>
usingPOST
to an interactive lona view. Without this change this fails with aUncaught ReferenceError: lona_window is not defined
in the browser.This change fixes the missing reference and allows to use the
POST
method to submit data to the view.