Liveblog Tag Methods

The widget DOM element exposes various API methods. All methods are only available after the tickarooLiveblogInit event has fired. If called before that, they will immediatly throw an error.

Example:

<script async src="https://cdn.tickaroo.com/webng/embedjs/tik4.js"></script>
<tickaroo-liveblog id="my-liveblog" liveblogId="LIVEBLOG_ID" clientId="CLIENT_ID"></tickaroo-liveblog>

<script>
  function onClickSomeNavigation() {
    document.getElementById('my-liveblog').navigateToEventId('EVENTID');
  }
</script>

Methods are:

Navigates to the specified eventId. Returns a Promise that is resolved when the navigation has finished. The resulting boolean indicates whether or not navigation was successfully executed.

topOffset is the distance in pixels between the top of the viewport and the post after the jump, for example the height of your sticky header. It overrides the embed’s own detection of a fixed or sticky header; topOffset: 0 turns that detection off and puts the post at the very top of the viewport. Without topOffset, the embed uses the height of the header it detects, or 0.

In an app whose web view sits inside a native scroll view, the jump is scrolled by your app. See Scrolling to Posts in Apps.

hasEventIdLoaded: (eventId) => boolean

Returns true if the specified eventId is part of the currently displayed widget.

loadMoreTop: () => Promise<void>

Manually trigger a “load more” at the top of the widget. The promise is resolved when the load more operation is completed.

loadMoreBottom: () => Promise<void>

Manually trigger a “load more” at the bottom of the widget. The promise is resolved when the load more operation is completed.

Manually activate or deactivate consent to specified third party embed provider.

See Integrated custom consent handling for more details.

setAdManager: (adManager: AdManager) => void

Set an AdManager for inline ads

See Inline Ads for more details.