Closed Bug 1211820 Opened 10 years ago Closed 10 years ago

chome.extension.getURL returns "url is not defined"

Categories

(WebExtensions :: Untriaged, defect)

42 Branch
x86_64
Windows 10
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1199473

People

(Reporter: warsaalk, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.52 Safari/537.36 Steps to reproduce: Hi, I'm testing my Chrome extension in Firefox 42.0b3 which has WebExtensions. I updated the manifest to match the supported properties from this page: https://wiki.mozilla.org/WebExtensions#Testing_out_the_WebExtensions_API I'm trying to set the default path for my web_accessible_resources by using the following line in my content_scripts file: contentPath : chrome.extension.getURL('chrome/content/') Grtz, Klaas Actual results: When the extension is launched it returns this error: ReferenceError: url is not defined => ExtensionContent.jsm:86:7 It seems that the resolve method is trying to use a url variable which doesn't exist. I guess it should be using the actual function parameter "path", as defined in getURL. Code: extension: { getURL: function(path) { return context.extension.baseURI.resolve(url); }, inIncognitoContext: PrivateBrowsingUtils.isContentWindowPrivate(context.contentWindow), } Expected results: This function should return the url from which I can access my web_accessible_resources defined in the manifest.json. Google Chrome returns: chrome-extension://ipmfkhoihjbbohnfecpmhekhippaplnh/chrome/content/
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
This was only fixed in Firefox 44, which is currently Firefox Nightly. We currently suggest that people testing WebExtension should always use Nightly.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.