Hallo John,
"John J. Foerch" <[email protected]> wrote:
> On Tue, Oct 25, 2011 at 07:50:04PM +0000, Jörg Sommer wrote:
>> Hi,
>>
>> when I run
>>
>> % conkeror -q -E 'add_hook("current_content_buffer_finished_loading_hook",
>> function (buffer) { dumpln("content loaded"); });'
>>
>> and open the link “reading the tutorial” on the startup page with
>> follow-new-buffer-background I only see the “content loaded” line for the
>> startup buffer, but not for the new buffer. Doesn't this hook fire for
>> background buffer?
>
> Correct. The current_content_buffer_*_hook hooks only fire for a buffer
> when it is the current buffer. You want content_buffer_finished_loading_hook.
Thanks. Is there a hook that is better suited to modify the HTML? I'm
setting buffer.document.documentElement.lang for a site that doesn't set
it.
add_hook("content_buffer_finished_loading_hook",
function (buffer)
{
if (buffer.document.domain == 'lwn.net')
buffer.document.documentElement.lang = 'en';
});
Regards, Jörg.
--
Der Wille und nicht die Gabe macht den Geber.
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror