跳到主要内容

chrome插件

Manifest V2和V3版本​

特征/属性Manifest V2Manifest 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来执行脚本