chrome.runtime.getURL与chrome.extension.getURL [英] chrome.runtime.getURL vs. chrome.extension.getURL

查看:1213
本文介绍了chrome.runtime.getURL与chrome.extension.getURL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

chrome.runtime.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 58开始

已弃用.请使用runtime.getURL.

Deprecated since Chrome 58. Please use runtime.getURL.

这篇关于chrome.runtime.getURL与chrome.extension.getURL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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