Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Use the currently opened widget to open another widget. For eg launch a modal widget from a sidebar widget
  • Launch the browser
  • Close the current widget (only applicable for modal widgets)

NoteWhen opening a widget or launching the browser with context, the assoicated event that is passed to the URL is client.widgetAction.

How do I use it?

Include flock.js in your widget via a script tag in the HTML.

...

  • url. The URL that should be opened.
  • desktopType. Can be either 'modal' or 'sidebar'.
  • mobileType. Can only be 'modal', which is also the default.

NoteWhen opening a widget using this method, the assoicated event that is passed to the URL is client.widgetAction.

flock.openBrowser(url[, sendContext])

...

  • url. The URL that should be opened.
  • sendContext. If false, then Flock just opens the link in the browser without passing any context to it.

NoteWhen aunching the browser with context using this method, the assoicated event that is passed to the URL is client.widgetAction.

flock.close()

Closes the widget within which this method was called.