FF supports navigator.share behind pref#12194
Conversation
|
@ddbeck Further to this, the webshare spec states that I just found this bug https://bugzilla.mozilla.org/show_bug.cgi?id=1635700 which indicates that FF does not support file sharing. Should we note this by marking the support in firefox as partial OR by adding a subfeature for @saschanaz Do you know when/if this feature is expected for Firefox? |
Sorry, I didn't quite follow this. You didn't mark the Mac partial implementation because you didn't test it? Or had reason to believe that this is a Chrome-specific limitation? The rest of this seems fine to me, I just want to figure out when/where we ought to be copying notes. |
Coming back to this after a couple of weeks - yes, that note is gibberish sorry. What I am saying is that Chrome marks The only reason I am questioning this is because I don't know the reason this was marked as partial support in the first place. If this could be because it is not supported on macOS then I could omit this caveat on android platforms. I guess I should add "partial" and the note for Opera though, as that runs on Mac. Does the question make sense now? |
Yes, this makes sense now. Reading the linked bug, it appears to be Mac specific, so I'd copy it to Edge and Opera. 👍 |
|
Thanks @ddbeck , |
It's not expected anytime soon, and |
|
And also probably a good chance to use |
|
@ddbeck @saschanaz OK, I added a files subfeature with versions based on
Question. Could/should we add subfeatures for text as well? The reason I ask is that Firefox for android does not support text sharing (at the moment captured with a note).
@ddbeck How do you do both a preference and a preview version? This is what it looks like now This was added in nightly in FF92 - see https://bugzilla.mozilla.org/show_bug.cgi?id=1641280 . I think it was only added for Windows though - dunno if that matters (i.e. it doesn't if preview is assumed to be Windows for Firefox). "firefox": [
{
"version_added": "preview"
},
{
"version_added": "71",
"version_removed": "91",
"flags": [
{
"type": "preference",
"name": "#dom.webshare.enabled",
"value_to_set": "enabled"
}
]
}
], |
ddbeck
left a comment
There was a problem hiding this comment.
Thanks, Hamish. Some general commentary here and a specific suggestion in a line comment.
Could/should we add subfeatures for text as well? The reason I ask is that Firefox for android does not support text sharing (at the moment captured with a note).
Yes, I endorse this. 👍
This was added in nightly in FF92 - see https://bugzilla.mozilla.org/show_bug.cgi?id=1641280 . I think it was only added for Windows though - dunno if that matters (i.e. it doesn't if preview is assumed to be Windows for Firefox).
I tried a few variants like this, but it can't cope with "preview". Ideas?
There's a lot to unpack here:
-
Operating system limitations imply
partial_implementation."preview"shouldn't change this. -
You said 'it can't cope with "preview"'. Sorry if I'm being dense, but can you elaborate on this? What's "it" and what is not coping, in this situation?
-
Based on the example, I'd interpret that to mean:
- In Nightly-only, it's enabled by default.
- In 71-91, it's available behind a pref.
- In 92+ (stable), it's no longer supported in anyway.
Is that the story you want to tell? If it isn't, what is?
|
Thanks, all helpful. I'll make the required changes tomorrow.
The story that I "know" is that prior to FF92 it is available behind pref ( 71-91), in FF92 it is available in Nightly by default and behind the pref for release. The restriction to Windows confuses me. My original understanding was that the preference change in Nightly was only for Windows, but that doesn't make much sense. @saschanaz is this a partial implementation? - ie this only works on Windows, or is it that we only enabled it for Windows, or is it that it behaves differently on Windows? Can you confirm? |
It's enabled on Windows and Android, and should generally work same way on both, except a nit: Windows does not support tracking share action properly, so it resolves after opening the share popup, not after completing the share action. (Same for Chrome) |
@saschanaz Ah, that wasn't clear to me, and makes this wrong: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share My understanding was that is that this should be re-written as:
Is that correct? Note the assertions:
I will correct the docs in line with your comment, but NOT record this nit as a compatibility issue in BCD. |
|
@ddbeck I have added With respect to adding preview, I still don't get how to do that. The story I am trying to tell is that it was added in version 71 behind a preference. From version 92 it is released (no pref required) in Nightly. I tried the following, but get |
I don't think this can be a strong assertion as each OS may behave different. But correct at least on Android. |
|
@ddbeck When you get a chance, this needs re-review. As discussed, this is not an immediate priority, just keeping it visible. |
ddbeck
left a comment
There was a problem hiding this comment.
Thanks, Hamish. Some suggestions in line comments.
Regarding Error: Invalid argument not valid semver ('preview' received), that's a bug. I'll open an issue about it.
api/Navigator.json
Outdated
| "version_added": "79", | ||
| "partial_implementation": true, | ||
| "notes": "Firefox for Android does not support sharing files or text." | ||
| "notes": "Firefox for Android does not support sharing text or files." |
There was a problem hiding this comment.
Since we have the subfeatures now, we can drop this note entirely
Co-authored-by: Daniel D. Beck <[email protected]>
Co-authored-by: Daniel D. Beck <[email protected]>
|
@ddbeck Thanks for the review. I've "accepted all". |

Navigator.share()was marked false for FireFox desktop. However testing shows that it does work for desktop Windows (at least). I think it was added in FF71 in this bug behind the preferencedom.webshare.enabled.Note that FF android is not blocked by this preference.
I also did some testing and verified that
Navigator.share()andNavigator.canShare()work on Windows Opera and Edge, and also Opera Android. I have guessed the versions for desktop match Chrome (but without the partial implementation warning due, I think, to MacOS issues).Upshot, those changes might perhaps revert to
trueif you think this is not a safe assumption.FYI these methods are protected by web-share permission. I have not added subfeatures for that, because I don't know if it is a compatibility issue (at all).