Provide a web extensions API-based way to send pages between devices
Categories
(Firefox :: Sync, enhancement, P5)
Tracking
()
People
(Reporter: eoger, Unassigned)
References
Details
(Whiteboard: [design-decision-needed])
Attachments
(1 file)
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Comment 8•7 years ago
|
||
Comment 9•7 years ago
|
||
Reporter | ||
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
Comment 12•5 years ago
|
||
Any news on this?
Comment 14•5 years ago
|
||
So it’s been 2 years since the last real discussion here (sadly I can’t see the original proposition), so here’s my proposition.
Compatibility
According to this comment, Firefox and Chrome works differently with regards to tabs synchronization and the API is not used much by Chrome extensions, and implementing this for compatibility was rejected (thus the P5 priority on this other bug report).
So I suppose it’s fine to introduce a new API better suited to Firefox’s needs.
API
My idea is to introduce an API similar to contextualIdentities.
- Introduce a new permission,
syncDevices
(«Get the list of your synchronized devices and send pages to them») syncDevices.Device
:{ id, icon, iconUrl, name }
.icon
should be one of:desktop
,phone
,tablet
,tv
,vr
.
syncDevices.query()
: return a list ofDevice
ssyncDevices.onCreated/Removed/Updated
: to listen to changes in devices.syncDevices.send(tabId, deviceId)
: send tab with tabId to device with deviceId (can only be called from inside the handler for a user action). To send to all devices, either deviceId could be omitted, or the dev could be required to use a specialsyncDevices.DEVICE_ID_ALL
.- Could be extended later to include a way to get synchronized tabs (e.g. with a limited
syncDevices.Tab
type with the bare minimum fields, a method to query sync tabs by device, listeners for changes and a method to open a tab based on its id and deviceId).
Security
The API can only send already opened tabs, as it is the case in Firefox UI. So either the extension can’t create tabs, or the user already trusts it to not open malicious websites. In both cases, sending a tab to a device needs a user interaction (in my proposition), but I’m not sure it’s enough (I suppose it would be nice to forbid several calls to syncDevices.send()
in response to the same user action).
Since my proposition is to add a new API/permission, this feature will only be available for extensions that specifically request it. The few extensions using this API could receive additional scrutiny/review by AMO reviewers.
Comment 15•5 years ago
|
||
cc Ana - this is an old proposal from Ed to expose send tab to extensions, with the idea being that we might encourage some novel/interesting applications for the feature.
Comment 16•4 years ago
|
||
Any news on this, or feedback on my proposal?
Comment 17•4 years ago
|
||
marking as wontfix - can revist if there's a clear product ask for this feature.
Comment 18•4 years ago
|
||
What qualifies as a clear product ask? Is this a Mozilla-internal thing? There are several existing extensions that are waiting on this functionality.
Comment 19•4 years ago
|
||
I'm one of extension authors waiting for this API. My product Tree Style Tab provides a vertical tab bar for very large number of tabs, and it still cannot provide the "send tab to device" command due to this restriction. It is painful for me to find to-be-sent tabs from Firefox's native tab UI when there are large number of pinned and unpinned tabs.
Comment 20•4 years ago
|
||
Please see this screenshot for more explanation.
Comment 21•4 years ago
|
||
Can't you just select the tab first? That's one extra click. Note also that it's not as simple as "just expose it" - we need to do it in a way that's safe (both from a privacy perspective and functionality/performances/abuse perspective) from addons without good intentions, and we can't prioritize that work at the moment.
Comment 22•4 years ago
|
||
It's always available as a right click from the tab. Fine. That doesn't help for extensions that entirely replace the native tab bar. Additionally, selecting the tab to get access to the addressbar menu means the page gets loaded, while right-clicking (or having an API) doesn't. In any case, the reaction here is on the bug getting closed as wontfix rather than left open; completely understandable that it's not prioritised (the age and history of the bug make that obvious).
Comment 23•4 years ago
|
||
(In reply to Mark Hammond [:markh] [:mhammond] from comment #21)
Can't you just select the tab first?
Yes, the workaround is effective for the case when I hope to send a foreground tab, and I ordinarily use that way for now.
It still hard for me to send background tabs. If they are pended (unloaded), the operation always load those tabs before sent.
I think it is enough safe and reasonable that requesting a new permission to list sync devices with a warning message, but I have no more objection if you and Firefox developers say it is not safe enough.
Updated•3 years ago
|
Description
•