You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently results in a successful share with no data.
It should reject with a TypeError.
Rationale: Empty shares are a bad user experience. They show up in the target application as empty strings which is confusing. There's the simple case of passing an empty dictionary to share, but we also have to consider the more plausible case of adding new fields in the future, and how sites that use the new API will interact with old UAs that don't support those new fields.
The current status quo is that if you share only new fields, you'll share nothing on an old UA.
We should offer feature detection for these new fields (see WebIDL #107) and then make it a TypeError if you fail to properly use the feature detection and only share new fields.
This is related to #47 which is about making navigator.share() equivalent to navigator.share({}). If we make this change, navigator.share() would remain a TypeError which makes me happy. I think navigator.share() being a successful share is nonsensical.
The text was updated successfully, but these errors were encountered:
This makes sharing the empty dictionary, or a dictionary with only
unrecognised fields, a programmer error, and is designed to aid in
future extensions (since if new fields are added, it will be a TypeError
to exclusively use them without feature detection).
Closes#48.
The following call:
Currently results in a successful share with no data.
It should reject with a
TypeError
.Rationale: Empty shares are a bad user experience. They show up in the target application as empty strings which is confusing. There's the simple case of passing an empty dictionary to
share
, but we also have to consider the more plausible case of adding new fields in the future, and how sites that use the new API will interact with old UAs that don't support those new fields.The current status quo is that if you share only new fields, you'll share nothing on an old UA.
We should offer feature detection for these new fields (see WebIDL #107) and then make it a TypeError if you fail to properly use the feature detection and only share new fields.
This is related to #47 which is about making
navigator.share()
equivalent tonavigator.share({})
. If we make this change,navigator.share()
would remain a TypeError which makes me happy. I thinknavigator.share()
being a successful share is nonsensical.The text was updated successfully, but these errors were encountered: