chrome插件
Manifest V2和V3版本
| 特征/属性 | Manifest V2 | Manifest V3 |
|---|---|---|
| Background Page | 使用Background Page作为后台运行的主要机制 | 使用Service Workers替代Background Page |
| Permissions | 需要在Manifest中显式声明所需的权限 | 引入了更严格的权限模型,包括运行时和安装时的权限 |
| Content Scripts | 使用Content Scripts操作网页内容 | 使用declarativeContent API替代Content Scripts |
| Event Handling | 使用chrome.extension API进行事件处理 | 采用更现代的事件监听和消息传递模型 |
| Isolated World | 无明确的隔离概念 | 引入了更加隔离的世界(isolated world)概念 |
| Performance Improvements | 性能方面较Manifest V3有限 | 旨在提高插件的性能和响应速度 |
| Message Passing | 使用chrome.extension.sendMessage等API进行消息传递 | 采用chrome.scripting API来执行脚本 |