JavaScript API Events
With the JavaScript API you can subscribe to events, such as when a user hovers over an object, switches artboards, goes fullscreen and more. Events allow you to develop dynamic and interactive user experiences by reacting to user actions in real-time.
Subscribe to Events
When you subscribe, you will start receiving events containing type and data properties. For a full list of events, please
refer to the table below.
Event Types
| Event Type | Event Data | Description |
|---|---|---|
| markerKitLoad | { markerkit_id, markerkit } | The widget is ready. |
| objectHover | { object_id } | User has hovered or tapped an object. |
| objectClick | { object_id } | User has clicked or tapped an object. |
| popupOpen | { popup_id } | A popup has been opened as a result of an object being clicked. |
| popupButtonClick | { popup_id } | User has clicked the button inside a popup. |
| openMenu | User has opened the menu drawer. | |
| menuItemClick | { object_id } | User has clicked or tapped a menu list item. |
| menuSearch | { search_query } | User has performed a search in the menu. |
| zoomAndPan | { zoom, pan_x, pan_y } | User has zoomed or panned the artboard. |
| goFullscreen | User has entered fullscreen mode. | |
| exitFullscreen | User has exited fullscreen mode. | |
| artboardChange | { artboard_id } | The current artboard has changed. |