如何在Mozilla加载和解析HTML之前对其进行预处理? [英] How to preprocess HTML before it's loaded and parsed by Mozilla?

查看:79
本文介绍了如何在Mozilla加载和解析HTML之前对其进行预处理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mozilla实际加载和解析HTML之前,我需要一种处理HTML的方法.我可以在Firefox扩展程序中使用任何内容侦听器吗?

I need a way to process HTML before it's actually loaded and parsed by Mozilla. Is there any content listener that I can use in my Firefox extension?

推荐答案

添加事件监听器 gBrowser 全局对象,请确保将usecapture设置为true .您也可以拦截响应.

Add an Event Listener to the gBrowser global object, making sure to set usecapture to true. You could also intercept the response.

这篇关于如何在Mozilla加载和解析HTML之前对其进行预处理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆