Web Share API on Edge should only return callback after a share action has been completed

%3CLINGO-SUB%20id%3D%22lingo-sub-1396184%22%20slang%3D%22en-US%22%3EWeb%20Share%20API%20on%20Edge%20should%20only%20return%20callback%20after%20a%20share%20action%20has%20been%20completed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1396184%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F309365%22%20target%3D%22_blank%22%3E%40josh_bodner%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Josh%2C%3C%2FP%3E%3CP%3EAccording%20to%20the%20description%20of%26nbsp%3Bnavigator.share()%20on%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FAPI%2FNavigator%2Fshare%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMDN%20Doc%3C%2FA%3E%2C%20the%20Promise%20returns%20by%20navigator.share()%20will%20be%20fulfilled%20when%20a%20share%20action%20has%20been%20completed.%3C%2FP%3E%3CP%3EAlthough%20Edge%20(on%20Windows)%20starts%20supporting%20Web%20Share%20API%20after%20version%2079%2C%20I%20find%26nbsp%3Bthe%26nbsp%3BPromise%20returns%20by%20navigator.share()%20will%20be%20fulfilled%20as%20soon%20as%20an%20OS%20built-in%20sharing%20panel%20popping%20up%2C%20even%20if%20a%20user%20hasn't%20clicked%20on%20any%20buttons%20on%20the%20panel.%3C%2FP%3E%3CP%3EIt%20is%20different%20from%20how%20I%20see%20Safari%20and%20Chrome%20handle%20the%20Web%20Share%20API%20callback.%20As%20far%20as%20I%20know%2C%20both%20Safari%20and%20Chrome%20only%20fulfill%20the%26nbsp%3BPromise%20from%20navigator.share()%20after%20a%20user%20has%20%22completed%22%20a%20share%20action%20on%20the%20OS%20sharing%20panel.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20really%20appreciate%20what%20you%20guys%20did%20for%20the%20new%20Edge.%20But%20I%20wonder%20if%20the%26nbsp%3B%3CSPAN%3EMicrosoft%20Edge%20Team%20will%20improve%20the%20design%20of%20Web%20Share%20API%20in%20the%20future.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EBest%20regards.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1406489%22%20slang%3D%22en-US%22%3ERe%3A%20Web%20Share%20API%20on%20Edge%20should%20only%20return%20callback%20after%20a%20share%20action%20has%20been%20completed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1406489%22%20slang%3D%22en-US%22%3E%3CP%3EAdding%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F17283%22%20target%3D%22_blank%22%3E%40William%20Devereux%3C%2FA%3E%20since%20he's%20one%20of%20the%20owners%20of%20Share.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Regular Visitor

@josh_bodner 

Hi Josh,

According to the description of navigator.share() on MDN Doc, the Promise returns by navigator.share() will be fulfilled when a share action has been completed.

Although Edge (on Windows) starts supporting Web Share API after version 79, I find the Promise returns by navigator.share() will be fulfilled as soon as an OS built-in sharing panel popping up, even if a user hasn't clicked on any buttons on the panel.

It is different from how I see Safari and Chrome handle the Web Share API callback. As far as I know, both Safari and Chrome only fulfill the Promise from navigator.share() after a user has "completed" a share action on the OS sharing panel. 

I really appreciate what you guys did for the new Edge. But I wonder if the Microsoft Edge Team will improve the design of Web Share API in the future.

Best regards.

1 Reply
Highlighted

Adding @William Devereux since he's one of the owners of Share.