问题描述
chrome.runtime.getURL
和 chrome.extension.getURL
?
文档暗示chrome.runtime.getURL
在应用程序和扩展程序中均可使用,并且 2012年发布的公告表示某些API(尽管 not getURL
)已从chrome.extension
移到了chrome.runtime
.
The documentation implies that chrome.runtime.getURL
works in both apps and extensions, and this 2012 announcement indicates that some APIs (though not getURL
) have moved from chrome.extension
to chrome.runtime
.
那么chrome.extension.getURL
有什么意义,为什么不赞成使用chrome.runtime.getURL
?
What's the point of chrome.extension.getURL
then, and why isn't it deprecated in favor of chrome.runtime.getURL
?
推荐答案
chrome.extension.getURL
现在已被弃用,您应该使用chrome.runtime.getURL
.
The chrome.extension.getURL
is now deprecated, you should use chrome.runtime.getURL
.
从chrome.extension.getURL
的文档:
这篇关于chrome.runtime.getURL与chrome.extension.getURL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!