Skip to main content

WebShare

Namespace: Wisej.Ext.WebShare

Assembly: Wisej.Ext.WebShare

Provides methods for sharing text, links, files, and other content to an arbitrary share target selected by the user.

public class WebShare

Can only be used from https or localhost. See: Web Share API.

Methods

Static memberCanShare()

Returns whether the browser is capable of performing a share operation.

Returns: Task<Object>.

Static memberCanShareAsync(url, text, title, fileStreams)

The CanShareAsync method of the Web Share API returns true if the equivalent call to ShareAsync would succeed.

ParameterTypeDescription
urlStringA string representing a URL to be shared.
textStringA string representing text to be shared.
titleStringA string representing the title to be shared.
fileStreamsFileStream[]An array of files representing files to be shared.

Returns: Task<Object>. The result from the client.

Static memberShareAsync(url, text, title, fileStreams)

The ShareAsync method of the Web Share API invokes the native sharing mechanism of the device to share data such as text, URLs, or files.

ParameterTypeDescription
urlStringA string representing a URL to be shared.
textStringA string representing text to be shared.
titleStringA string representing the title to be shared.
fileStreamsFileStream[]An array of files representing files to be shared.

Returns: Task<Object>. The result from the client.