Skip to content
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

Clarify devtools.panels.create() path resolution #20617

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 76 additions & 3 deletions webextensions/api/devtools.json
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,7 @@
"chrome": {
"version_added": true
},
"edge": {
"version_added": "79"
},
"edge": "mirror",
"firefox": {
"version_added": "54"
},
Expand All @@ -497,6 +495,81 @@
"version_added": false
}
}
},
"iconPath": {
"__compat": {
"support": {
"chrome": {
"version_added": true,
"notes": "URL always resolved as absolute."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggestion in the related PR states this may also be relative to the extension directory and the extensions docs say a URL "relative to the extension directory"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsmth within the context of a web extension they are the same thing e.g. "you can specify the path as an absolute URL, starting at the extension's root, like this: /path/to/stylesheet.css" e.g. the extension root is the starting point. Hence we have statements such as "When a content script makes an HTTP(S) request, you must provide absolute URLs." in the web extensions docs.

},
"edge": "mirror",
"firefox": {
"version_added": "54",
"notes": "URL is resolved as relative to the current extension page (unless expressed as an absolute URL, e.g. '/icons/panel.png')."
},
"firefox_android": {
"version_added": false
},
"opera": "mirror",
"safari": {
"version_added": "16",
"notes": "URL always resolved as absolute."
},
"safari_ios": {
"version_added": false
}
}
}
},
"pagePath": {
"__compat": {
"support": {
"chrome": {
"version_added": true,
"notes": "URL always resolved as absolute."
},
"edge": "mirror",
"firefox": {
"version_added": "54",
"notes": "URL is resolved as relative to the current extension page (unless expressed as an absolute URL, e.g. '/icons/panel.png')."
},
"firefox_android": {
"version_added": false
},
"opera": "mirror",
"safari": {
"version_added": "16",
"notes": "URL always resolved as absolute."
},
"safari_ios": {
"version_added": false
}
}
}
},
"title": {
"__compat": {
"support": {
"chrome": {
"version_added": true
},
"edge": "mirror",
"firefox": {
"version_added": "54"
},
"firefox_android": {
"version_added": false
},
"opera": "mirror",
"safari": {
"version_added": "16"
},
"safari_ios": {
"version_added": false
}
}
}
}
},
"elements": {
Expand Down