Interface ShareAction.ShareJs

All Superinterfaces:
Serializable
Enclosing class:
ShareAction

@JsDefinition public static interface ShareAction.ShareJs extends Serializable
How the share sheet is opened, as a snippet for JsSnippets.of(Class).

For internal use only. May be renamed or removed in a future release.

  • Method Summary

    Modifier and Type
    Method
    Description
    share(@Nullable JsFunction title, @Nullable JsFunction text, @Nullable JsFunction url)
    An action that opens the share sheet with the values of the given inputs, leaving out each field whose input is null.
  • Method Details

    • share

      @JsExpression("const data = {};\nif ($0) data.title = $0(event);\nif ($1) data.text = $1(event);\nif ($2) data.url = $2(event);\nreturn navigator.share(data);") @JsFunctionParameterNames("event") JsFunction share(@Nullable JsFunction title, @Nullable JsFunction text, @Nullable JsFunction url)
      An action that opens the share sheet with the values of the given inputs, leaving out each field whose input is null.
      Parameters:
      title - the input producing the title, or null
      text - the input producing the text, or null
      url - the input producing the URL, or null
      Returns:
      the action function, which returns the promise of the share