Step
Defined in: step.ts:574
A class representing steps to be added to a tour.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Step(
tour,options?):Step
Defined in: step.ts:618
Parameters
Section titled “Parameters”options?
Section titled “options?”StepOptions = {}
Returns
Section titled “Returns”Step
Overrides
Section titled “Overrides”Properties
Section titled “Properties”bindings
Section titled “bindings”bindings:
Bindings
Defined in: evented.ts:23
The handlers registered through on and once.
Inherited from
Section titled “Inherited from”classPrefix?
Section titled “classPrefix?”
optionalclassPrefix?:string
Defined in: step.ts:588
The tour’s classPrefix, ending in -.
cleanup
Section titled “cleanup”cleanup:
Function|null
Defined in: step.ts:592
Stops keeping the step positioned. Set while the step is rendered.
optionalel?:HTMLElement|null
Defined in: step.ts:596
The step’s element. Prefer getElement().
id:
string
Defined in: step.ts:600
The step’s id option, or a generated one.
options
Section titled “options”options:
StepOptions
Defined in: step.ts:604
The step’s options, merged with the tour’s defaultStepOptions.
shepherdElementComponent?
Section titled “shepherdElementComponent?”
optionalshepherdElementComponent?:ShepherdElementResult
Defined in: step.ts:608
The step’s rendered element and its teardown.
target?
Section titled “target?”
optionaltarget?:HTMLElement|null
Defined in: step.ts:612
The element the step attached to. Prefer getTarget().
tour:
Tour
Defined in: step.ts:616
The tour the step belongs to.
Methods
Section titled “Methods”cancel()
Section titled “cancel()”cancel():
void
Defined in: step.ts:643
Cancel the tour
Triggers the cancel event
Returns
Section titled “Returns”void
complete()
Section titled “complete()”complete():
void
Defined in: step.ts:652
Complete the tour
Triggers the complete event
Returns
Section titled “Returns”void
destroy()
Section titled “destroy()”destroy():
void
Defined in: step.ts:661
Remove the step, delete the step’s element, and stop repositioning it.
Triggers destroy event
Returns
Section titled “Returns”void
getElement()
Section titled “getElement()”getElement():
HTMLElement|null|undefined
Defined in: step.ts:805
Returns the element for the step
Returns
Section titled “Returns”HTMLElement | null | undefined
The element instance. undefined if it has never been shown, null if it has been destroyed
getTarget()
Section titled “getTarget()”getTarget():
HTMLElement|null|undefined
Defined in: step.ts:813
Returns the target for the step
Returns
Section titled “Returns”HTMLElement | null | undefined
The element instance. undefined if it has never been shown, null if query string has not been found
getTour()
Section titled “getTour()”getTour():
Tour
Defined in: step.ts:692
Returns the tour for the step
Returns
Section titled “Returns”The tour instance
hide()
Section titled “hide()”hide():
void
Defined in: step.ts:699
Hide the step
Returns
Section titled “Returns”void
isOpen()
Section titled “isOpen()”isOpen():
boolean
Defined in: step.ts:750
Check if the step is open and visible
Returns
Section titled “Returns”boolean
True if the step is open and visible
off(
event,handler?):Step
Defined in: evented.ts:64
Removes an event listener for the given event string.
Parameters
Section titled “Parameters”string
handler?
Section titled “handler?”Returns
Section titled “Returns”Step
Inherited from
Section titled “Inherited from”on(
event,handler,ctx?,once?):Step
Defined in: evented.ts:34
Adds an event listener for the given event string.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”unknown
boolean = false
Returns
Section titled “Returns”Step
Inherited from
Section titled “Inherited from”once()
Section titled “once()”once(
event,handler,ctx?):Step
Defined in: evented.ts:53
Adds an event listener that only fires once for the given event string.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”unknown
Returns
Section titled “Returns”Step
Inherited from
Section titled “Inherited from”show()
Section titled “show()”show():
Promise<void>
Defined in: step.ts:758
Wraps _show and ensures beforeShowPromise resolves before calling show.
The step is not shown if the tour moved on or ended while it was pending.
Returns
Section titled “Returns”Promise<void>
trigger()
Section titled “trigger()”trigger(
event, …args):Step
Defined in: evented.ts:87
Triggers an event listener for the given event string.
Parameters
Section titled “Parameters”string
…any[]
Returns
Section titled “Returns”Step
Inherited from
Section titled “Inherited from”updateStepOptions()
Section titled “updateStepOptions()”updateStepOptions(
options):void
Defined in: step.ts:785
Updates the options of the step. positionOptions combines key by key with
the current ones, and classes with the tour’s default classes, as when
the step was created.
Parameters
Section titled “Parameters”options
Section titled “options”The options for the step
Returns
Section titled “Returns”void