diff options
author | Patrick Steinhardt <ps@pks.im> | 2019-09-14 11:46:35 +0200 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2019-11-11 14:39:45 +0100 |
commit | 69ab0df7118ec9781362f1c3afc0a698836d8264 (patch) | |
tree | 4f47b6a5c1cca1cc9196ea34511b148f39a5d415 /doc/vimb.1 | |
parent | 9241283fb6ffe68779b50444a77502372aeaa314 (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.1 | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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. |