[webkit-gtk] Ignoring form submission doesn't work in 2.14
Vasiliy Faronov
vfaronov at gmail.com
Fri Jan 13 13:08:10 PST 2017
On Fri, Jan 13, 2017 at 7:39 PM, Michael Catanzaro
<mcatanzaro at igalia.com> wrote:
> Do you just keep the references forever... so your program's
> correctness depends on an intentional memory leak?
Exactly.
> Maybe this indicates that our forms API is insufficient.
Perhaps. Ideally I'd want something like preventDefault() on a DOM submit event.
If I connect to decide-policy [1] and then call
webkit_policy_decision_ignore [2], then the submit-form signal is not
emitted, so I can't get the submitted data. (Actually, I can with a
hack: ensure that all forms have method=get, and parse the query
string out of the WebKitURIRequest. I'll probably go that way if I
don't find a better solution.)
By the way, another problem I have with the API is that
webkit_form_submission_request_get_text_fields [3] only seems to
return the values of text inputs (type=text, type=password etc., but
not type=checkbox or select). Is this intentional?
[1] https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#WebKitWebView-decide-policy
[2] https://webkitgtk.org/reference/webkit2gtk/stable/WebKitPolicyDecision.html#webkit-policy-decision-ignore
[3] https://webkitgtk.org/reference/webkit2gtk/stable/WebKitFormSubmissionRequest.html#webkit-form-submission-request-get-text-fields
--
Vasiliy
More information about the webkit-gtk
mailing list