Class Share

java.lang.Object
org.vaadin.firitin.util.Share

public class Share extends Object
A simple wrapper for the Web Share API. See also: https://developer.mozilla.org/en-US/docs/Web/API/Web_Share_API
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.vaadin.flow.component.page.PendingJavaScriptResult
    share(String title, String text, String url)
    Share a link using the Web Share API.
    static com.vaadin.flow.component.page.PendingJavaScriptResult
    share(String title, String text, URI url)
    Share a link using the Web Share API.
    static com.vaadin.flow.component.page.PendingJavaScriptResult
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Share

      public Share()
  • Method Details

    • share

      public static com.vaadin.flow.component.page.PendingJavaScriptResult share(String title, String text, URI url)
      Share a link using the Web Share API.
      Parameters:
      title - The title of the document being shared. May be ignored by the target.
      text - Arbitrary text that forms the body of the message being shared.
      url - A URL string referring to a resource being shared.
    • share

      public static com.vaadin.flow.component.page.PendingJavaScriptResult share(String title, String text, String url)
      Share a link using the Web Share API.
      Parameters:
      title - The title of the document being shared. May be ignored by the target.
      text - Arbitrary text that forms the body of the message being shared.
      url - A URL string referring to a resource being shared.
    • share

      public static com.vaadin.flow.component.page.PendingJavaScriptResult share(Share.ShareData data)