-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistency: devtools.panels.create() #270
Comments
Safari treats the paths as relative to the extension directory, like Chrome. |
Just to clarify: in this case, the extension directory is always defined to be the directory of |
Correct. |
This is not limited to just the Another workaround is to simply always use absolute URLs like the following: Some considerations
|
@bershanskiy (or whoever wants to), please open an issue for this on crbug.com.
Can you share more details? It might be creating a new meta issue to track the more generic inconsistency and referencing this issue from it. |
@dotproto if I recall this correctly, I have been dealing with this issue myself with the |
I searched for a bug and didn't find one, so I'll create a new one soon (with a detailed repro case). I will post the link here. It would be nice to get a consensus from all browser vendors eventually (especially from Apple since Safari 16 still could alter its behavior prior to the launch). Also, consider adding the "next manifest version" label because this is a breaking change and is probably not very likely to be fixed in MV3 or MV2. |
@dotproto Checked a few APIs manually in firefox and indeed However, when checking the notifications API iconUrl property, this is handled absolutely. |
FYI, I created a Chromium bug for Note 2: https://bugs.chromium.org/p/chromium/issues/detail?id=1364293 |
devtools.panels.create(title, iconPath, pagePath)
resolvesiconPath
andpagePath
as absolute URLs in Chrome and as relative URLs in Firefox, leading to inconsistency.Specifically, Chrome docs state:
MDN states (shortened):
I did not find documentation about Safari behavior but I tested Safari Technology Preview 153 (future Safari 16.0) and it used paths relative to the extension directory (like Chrome). I created this project for testing.
Safari 16 Beta Release Notes list under "Safari Web Extensions > New Features" there is "Added support for Safari Web Inspector Extensions", which most likely includes this method. According to MDN BCD, this method is available in Safari 16 Technology Preview (in line with release notes).
Note: some popular DevTools extensions seem to work around this difference by placing the DevTools background page into the same folder as
manifest.json
.Note 2: There is apparently a bug in Chrome 99+ which makes absolute URLs produce double slashes in message's
sender.url
. For example, this bug affects Svelte DevTools (10000+ users on CWS). Details: sveltejs/svelte-devtools#69, two possible fixes (either one would work): sveltejs/svelte-devtools#70, sveltejs/svelte-devtools#78The text was updated successfully, but these errors were encountered: