-
Notifications
You must be signed in to change notification settings - Fork 971
Implement navigator.registerProtocolHandler #1583
Comments
could you explain in more detail what is needed? are you saying that any site should be able to register itself as a bitcoin handler, or just whitelisted sites, or just the background page context? window.navigator.registerProtocolHandler is implemented already but presumably only works for same-origin registrations. i am against allowing it in general for security reasons. |
thanks. i don't think it works in the browset at the moment... if you go to one of the bitcoin sites, and click on the button to setup the site to handle bitcoin payments, e.g., https://www.coinbase.com/settings/preferences (for coinbase) folks, then it's a no-op on the brave browser. if i do the same thing in either chrome or firefox, i get a dialog asking for permission and if i click accept, then the protocol handler is registered with that browser. with the brave browser, i don't get either the dialog nor does is the handler registered... |
The dialog is a chrome-specific feature, so not surprising that it doesn't appear. |
i believe that chrome, firefox, and opera all support it... otherwise, i agree that it does seem like an electron issue... either that, or we aren't hooking into electron properly in terms of a callback/option enabling the feature. |
@diracdeltas can we confirm this is an Electron issue? |
I have this working but need it to persist on session restart and need to test with packaged builds and work out some other corner cases. Attached backup WIP electron patch. |
Implemented here: Still need to fix a crash with command+click and shift+click though. Otherwise good to go. |
Most of this work is done here: brave/muon@774ae83 But this review is just for the front end part. Fix #1583 Auditors: @diracdeltas
cf., https://html.spec.whatwg.org/multipage/webappapis.html#dom-navigator-registerprotocolhandler
needed for things like the Bitcoin URI
thanks!
/mtr
The text was updated successfully, but these errors were encountered: