[webkit-dev] Possibility of extending parameters of WKPageWillSubmitFormCallback for WebKit2
g.czajkowski at samsung.com
Tue Dec 20 07:05:59 PST 2011
There is useful callback WKPageWillSubmitFormCallback in WebKit2 which may
notify an application when submit button was clicked.
This callback provides through its parameters values of input fields by
WKDictionaryRef type (in fact HashMap converted to API), where key is a name
of input field and value is a typed text to an input field.
I see three disadvantages of it:
1. Input fields information is keep in hashmap, so they are not keep
in order as they occur on page. Application can't determine order of text
input fields based on passed hashmap.
2. Type of input fields are not passed (like password, text), we have
only its name.
3. HashMap for given key returns typed text to an input field not a
default one. HTML's attribute value includes default value of input fields.
It may confuse a developer.
I will not limit input fields information to the name and typed text only.
What do you think about passing WKArrayRef<WKDictionary> instead of
WKDictionaryRef where each item of array will be contain all attributes of
input fields as key-value?
Additionally we can add form attributes as WKDictionary to the callback to
identify form on which submit button was clicked.
I will be glad to hear your opinion about it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev