this prepare a new setting "content-security-policy" that need to be
setted very early (before LoadCommited, where some HTTP-Headers are
already processed by webkit).
.TP
.B LoadProvisional
Fired if a new page is going to opened. No data has been received yet, the load
-may still fail for transport issues. Out of this reason this event has no
-associated URL to match.
+may still fail for transport issues.
.TP
.B LoadCommited
Fired if first data chunk has arrived, meaning that the necessary transport
switch (webkit_web_view_get_load_status(view)) {
case WEBKIT_LOAD_PROVISIONAL:
#ifdef FEATURE_AUTOCMD
- autocmd_run(AU_LOAD_PROVISIONAL, NULL, NULL);
+ {
+ WebKitWebFrame *frame = webkit_web_view_get_main_frame(view);
+ WebKitWebDataSource *src = webkit_web_frame_get_provisional_data_source(frame);
+ WebKitNetworkRequest *req = webkit_web_data_source_get_initial_request(src);
+ uri = webkit_network_request_get_uri(req);
+ autocmd_run(AU_LOAD_PROVISIONAL, uri, NULL);
+ }
#endif
/* update load progress in statusbar */
vb.state.progress = 0;