mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-29 09:52:50 -10:00
This patch suggests deprecating proxy.registerProxyScript and replacing it with proxy.register since this API won't support registering anything other than proxy scripts. I normally would be hesitant to suggest making a name change after an API is released, but this API is one that is still in development, and for that reason I think changes like this should be somewhat expected until the API becomes more stable. MozReview-Commit-ID: 9UeuUjQ6OU5
70 lines
1.7 KiB
JSON
70 lines
1.7 KiB
JSON
[
|
|
{
|
|
"namespace": "manifest",
|
|
"types": [
|
|
{
|
|
"$extend": "Permission",
|
|
"choices": [{
|
|
"type": "string",
|
|
"enum": [
|
|
"proxy"
|
|
]
|
|
}]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"namespace": "proxy",
|
|
"description": "Use the browser.proxy API to register proxy scripts in Firefox. Proxy scripts in Firefox are proxy auto-config files with extra contextual information and support for additional return types.",
|
|
"permissions": ["proxy"],
|
|
"functions": [
|
|
{
|
|
"name": "register",
|
|
"type": "function",
|
|
"description": "Registers the proxy script for the extension.",
|
|
"async": true,
|
|
"parameters": [
|
|
{
|
|
"name": "url",
|
|
"type": "string",
|
|
"format": "strictRelativeUrl"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "unregister",
|
|
"type": "function",
|
|
"description": "Unregisters the proxy script for the extension.",
|
|
"async": true,
|
|
"parameters": []
|
|
},
|
|
{
|
|
"name": "registerProxyScript",
|
|
"type": "function",
|
|
"description": "Registers the proxy script for the extension.",
|
|
"deprecated": "Please use $(ref:proxy.register)",
|
|
"async": true,
|
|
"parameters": [
|
|
{
|
|
"name": "url",
|
|
"type": "string",
|
|
"format": "strictRelativeUrl"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "onProxyError",
|
|
"type": "function",
|
|
"description": "Notifies about proxy script errors.",
|
|
"parameters": [
|
|
{
|
|
"name": "error",
|
|
"type": "object"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
] |