summaryrefslogtreecommitdiff
path: root/doc/vimb.1
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-09-14 11:46:35 +0200
committerPatrick Steinhardt <ps@pks.im>2019-11-11 14:39:45 +0100
commit69ab0df7118ec9781362f1c3afc0a698836d8264 (patch)
tree4f47b6a5c1cca1cc9196ea34511b148f39a5d415 /doc/vimb.1
parent9241283fb6ffe68779b50444a77502372aeaa314 (diff)
autocmd: implement new LoadStarting event
The first autocommand event that is being triggered when loading a website is the "LoadStarted" event. LoadStarted gets triggered when the web view has started loading of the page, notably after the initial request has been sent. Thus, this event comes too late to change settings that would modify the initial request, like e.g. the user agent. Implement a new event LoadStarting that triggers immediately before performing the initial load and thus before LoadStarted. As WebKit does not provide any signal for this, we have to manually trigger this event when executing any load or navigation actions. The best place to piggy-back on WebKit itself is in fact `decide_navigation_action`, which will get executed on clicks, history navigation and `load_uri`. Like this, there is only a single location that needs to trigger the new event. This change enables one to modify configuration like the user agent for certain websites, which was not possible with "LoadStarted".
Diffstat (limited to 'doc/vimb.1')
-rw-r--r--doc/vimb.14
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/vimb.1 b/doc/vimb.1
index e86d561..7d50fd6 100644
--- a/doc/vimb.1
+++ b/doc/vimb.1
@@ -709,6 +709,10 @@ No white space can be used in this list.
.PD 0
Events:
.TP
+.B LoadStarting
+Fired before a new page is going to be opened.
+No data has been sent or received yet, the load may still fail for transport issues.
+.TP
.B LoadStarted
Fired if a new page is going to be opened.
No data has been received yet, the load may still fail for transport issues.