Closed
Bug 1371879
Opened 7 years ago
Closed 7 years ago
Add API to clear registered proxy script
Categories
(WebExtensions :: Untriaged, defect)
WebExtensions
Untriaged
Tracking
(firefox56 fixed)
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: 61.1p57, Assigned: mattw, NeedInfo)
References
Details
(Keywords: dev-doc-complete, Whiteboard: [proxy] investigating)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0 Build ID: 20170605134926 Steps to reproduce: The proxy support in Firefox is different from Chrome, and there is currently no functionally equivalent API for chrome.proxy.settings.clear https://developer.chrome.com/extensions/proxy#method-settings-clear
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(mwein)
Updated•7 years ago
|
Whiteboard: investigating
Updated•7 years ago
|
Whiteboard: investigating → [proxy] investigating
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → mwein
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(mwein)
I have made the following edits to 'proxy.json' & 'ext-proxy.js' They include suggestions and function name changes but they are only suggestion. proxy.json https://pastebin.mozilla.org/9025785 ext-proxy.js https://pastebin.mozilla.org/9025786
Here are the same as above with register & unregister as function names https://pastebin.mozilla.org/9025799 https://pastebin.mozilla.org/9025800
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•7 years ago
|
||
Erosman, thank you for the contribution!
ref: review board API name change While you are at it, you might as well consider proxy.onProxyError changing/aliasing to proxy.onError/onerror proxy.register proxy.unregister proxy.onerror (for better harmony with other APIs) eg: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onerror https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequestEventTarget/onerror
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8881197 [details] Bug 1371879 - Add support for unregistering proxy scripts https://reviewboard.mozilla.org/r/152464/#review157714
Attachment #8881197 -
Flags: review?(mixedpuppy) → review+
Pushed by mwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/11962cdf2078 Add support for unregistering proxy scripts r=mixedpuppy
Comment 9•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/11962cdf2078
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Comment 10•7 years ago
|
||
What happened to proxy.onerror?!
Assignee | ||
Comment 11•7 years ago
|
||
Sorry for not explaining - I'd okay with renaming to onError, but I'd rather make than change in a separate bug.
Comment 12•7 years ago
|
||
I realise that this bug is closed but I didnt want to open a new bug (unless it is needed). I am unsure about how the API is implemented. Looking at the following example: https://github.com/mdn/webextensions-examples/tree/master/proxy-blocker - It seems 'proxy-script.js' is initiated at browser start. Is it cached? It makes sense to cache the proxy script, but then ... - New preferences are sent to 'proxy-script.js' via 'runtime.onMessage' What happens then? If the 'proxy-script.js' is cached, how would it affect the change? Does the 'proxy-script.js' automatically unregistered and registers every time new data is sent via 'runtime.onMessage'? What happens to the new preference data passed to 'proxy-script.js' once 'proxy-script.js' is unloaded/unregistered? With the addition of the unregister, developers can now manually stop and restart the 'proxy-script.js' every time they need to update the rules. How would the API work in FF55? (since unrgister is due for FF56)
Keywords: dev-doc-needed
Comment 13•7 years ago
|
||
I've updated the docs for the addition of unregister() and the rename of registerProxyScript() to just register(): https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/proxy https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/proxy/register https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/proxy/unregister Please let me now if this covers it!
Flags: needinfo?(matthewjwein)
Comment 14•7 years ago
|
||
re: comment 10-11 Was proxy.onError ever filed?
Comment 15•7 years ago
|
||
> Was proxy.onError ever filed?
Not to my knowledge. Please do so if you want that change.
Comment 16•7 years ago
|
||
Filed: Bug 1388619
Updated•7 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•