"find" 权限在 webextensions 中有什么作用
What does the "find" permission do in webextensions
在文档上:https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/permissions 我看到 api 权限之一是 find
,但它没有解释它的作用。
我猜它允许我检索 Ctrl-F
查找框搜索,但我不知道在哪里可以找到有关如何实际执行此操作的文档。
有什么想法吗?
它允许您使用这个 API:https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/find。如果您不在 manifest.json 中请求权限,您将无权访问 API.
函数:
find.find()
Find text in a web page.
find.highlightResults()
Highlight the last set of matches found.
find.removeHighlighting()
Remove any highlighting.
在文档上:https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/permissions 我看到 api 权限之一是 find
,但它没有解释它的作用。
我猜它允许我检索 Ctrl-F
查找框搜索,但我不知道在哪里可以找到有关如何实际执行此操作的文档。
有什么想法吗?
它允许您使用这个 API:https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/find。如果您不在 manifest.json 中请求权限,您将无权访问 API.
函数:
find.find()
Find text in a web page.
find.highlightResults()
Highlight the last set of matches found.
find.removeHighlighting()
Remove any highlighting.