Browser API
  • Browser API
    • Getting Started
    • Examples
      • Combos
      • Bundles
      • Bundle builders
      • Kits
      • Looks
      • Common
    • API Reference
    • API Events
    • Release history
    • Why PickyStory
    • License
Powered by GitBook
On this page
  • PickyStoryEvent
  • API_READY
  • DEAL_DISCOUNTS

Was this helpful?

  1. Browser API

API Events

PreviousAPI ReferenceNextRelease history

Last updated 2 years ago

Was this helpful?

PickyStoryEvent

Public event sent to listeners in customer code.

Kind: global class

    • instance

      • ⇒ boolean

      • ⇒ Object

    • static

new PickyStoryEvent(name, [payload])

Event constructor, requires event name and an optional payload object

Param
Type
Description

name

string

one of the values in {Events}

[payload]

Object

optional payload object

pickyStoryEvent.validate ⇒ boolean

Validate event and optionally filter the desired event type

Param
Type
Description

event

the input event object

[name]

string

optional event name to filter

pickyStoryEvent.extractPayload ⇒ Object

Helper method to accept only the desired event type and extract its payload

Param
Type
Description

event

the input event object

[name]

string

optional event name to filter

PickyStoryEvent.type

Public event type used as the typeArg value of CustomEvent

PickyStoryEvent.Events

Supported API event names

API_READY

Browser API has finished loading and is ready for use

Kind: global variable

DEAL_DISCOUNTS

Deal discounts have been applied to the current cart

Kind: global variable

Kind: instance property of Returns: boolean - true if valid, false otherwise

Kind: instance property of Returns: Object - payload object or null if the event does not match the desired name

Kind: static property of

Kind: static property of

PickyStoryEvent
new PickyStoryEvent(name, [payload])
.validate
.extractPayload
.type
.Events
PickyStoryEvent
PickyStoryEvent
PickyStoryEvent
PickyStoryEvent
PickyStoryEvent
PickyStoryEvent