3 Developing: 5. Custom Callbacks
athena edited this page 4 months ago

Custom Component Callbacks

Version 3.9.0 of Jupiter introduced support for custom component callbacks. These are optional functions that will be called when certain components interactions are taken (such as selecting a Tile).

For instance, what if you need outside access to the current list of selected tiles?

With custom components, you can handle this with ease.

The bottom of your document would look something like:

    let custom_callbacks = {
        tile: {
            on_select: () => {
<script src="jupiterui.js"></script>

This document will be updated with a list of all component callbacks available.

Available Callbacks

For now, the focus is on the components.

  • Notification:
    • on_push: is called when a notification is pushed
  • Tile:
    • on_select: is called when a .selectable tile is either selected or deselected

More callbacks will become available as time goes on.