Skip to content

AtloriaTourPlayer

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/tour-widget/src/player.ts

Methods

MethodSignatureReturns
start`start(flowOrId: stringCapturedFlow)`
stopstop()void
nextnext()void
backback()void
isActiveisActive()boolean

Where it refuses work

  • AtloriaTourPlayer stops the work with an early return when !this.flow.
  • AtloriaTourPlayer stops the work with an early return when !res.ok.
  • AtloriaTourPlayer stops the work with an early return when el instanceof HTMLElement.
  • AtloriaTourPlayer stops the work with an early return when node instanceof HTMLElement.
  • AtloriaTourPlayer stops the work with an early return when !this.active || this.loading || this.error.
  • AtloriaTourPlayer stops the work with an early return when !tip.

When something fails

  • AtloriaTourPlayer handles failure in 4 places: it discards it silently in 2, logs it and continues in 1, and turns it into a return value in 1.

Was this page helpful?

Download as PDF