content icon indicating copy to clipboard operation
content copied to clipboard

Clarify devtools.panels.create() path resolution

Open bershanskiy opened this issue 3 years ago • 3 comments

Description

Fix mistake in description of devtools.panels.create().

Motivation

Make documentation correct.

Additional details

Chromium

Chrome docs state:

iconPath Path of the panel's icon relative to the extension directory. pagePath Path of the panel's HTML page relative to the extension directory.

Safari

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. I did not find documentation about Safari 16 behavior so I tested Safari Technology Preview 153 (future Safari 16.0) and it used paths relative to manifest.json (like Chrome). I created this project for testing.

Note: some popular DevTools extensions seem to work around this difference by placing the DevTools background page into the same folder as manifest.json.

Related issues and pull requests

This difference discussed in W3C WebExtensions working group: https://github.com/w3c/webextensions/issues/270

bershanskiy avatar Sep 11 '22 07:09 bershanskiy

Preview URLs

(comment last updated: 2023-09-11 02:29:36)

github-actions[bot] avatar Sep 11 '22 07:09 github-actions[bot]

The flaw is not caused by this PR, it existed prior to this PR and was caused by BCD. Also, that underlying problem was already fixed in BCD itself: https://github.com/mdn/browser-compat-data/pull/17755

bershanskiy avatar Sep 11 '22 21:09 bershanskiy

Safari 16 was released, and the BCD PR was merged (linked above), is there anything else I could do to advance this PR?

bershanskiy avatar Sep 20 '22 18:09 bershanskiy

@bershanskiy As an MDN reviewer and Chrome's new person on extensions, I'm one of the most logical people to review this. I have no corrections to request. I haven't merged this because non-normative implementation differences are usually handled in BCD notes. I actually think that what you did might be temporarily correct for extensions, but I need to discuss this with Ruth. Can you hang on a bit longer?

jpmedley avatar Sep 22 '22 20:09 jpmedley

Thanks for the reply, I just wanted to ensure I'm not blocking anything. Regarding possible MDN update: it was not immediately clear what is the "correct"/"standard" way of handling paths, so I was not sure whether the comment should be on Firefox or all other browsers and whether subfeature should be called "Relative path resolution" or "Absolute path resolution".

bershanskiy avatar Sep 22 '22 21:09 bershanskiy

I see that you're the one who opened this ticket in the spec. Are you involved in extensions or did it have more to do with you being a w3c employee? If the former, I think we might be ploying the same field. Can you send me a private email so we can compare notes? jmedley at google dot com.

Were you at TPAC last week?

jpmedley avatar Sep 23 '22 14:09 jpmedley

Thanks for the prompt reply! I'm just someone interested in WebExtensions and I'm not affiliated with W3C aside from being a member of a few community working groups. I missed TPAC last week, although I wish I didn't. I'll follow up in an email soon.

bershanskiy avatar Sep 23 '22 19:09 bershanskiy

Hi @bershanskiy, @jpmedley - just wanted to check in on the status of this one. Are we waiting on a decision whether to have browser-specific details in the prose or not? Thanks :)

bsmth avatar Jun 15 '23 10:06 bsmth

As per this comment, can you please add the implementation differences to BCD repo?

Do you need help with that?

jpmedley avatar Jun 20 '23 16:06 jpmedley