Bring Your Own (BYO): Custom Events
The Bring Your Own framework is intended for developers who have a strong understanding of the Unqork Designer Platform and JavaScript JavaScript is an object-oriented computer programming language. It is most-commonly used for interactive effects in the browser..
Overview
The BYO framework enables developers to create custom events that integrate seamlessly with the Unqork Designer Platform. Custom events DOM (Document Object Model) events are signals or notifications that something has occurred or is occurring within a web page, often triggered by user interactions or by the browser itself. These events allow JavaScript to react to changes and interactions on a web page, making it dynamic and interactive. can be scoped to individual components or registered as global events. After defining and registering a custom event, it functions as a native event that can be used throughout the platform.
For security reasons, external URLs cannot be imported into a BYO implementation file. Unqork recommends copying external source code and importing it into the JavaScript JavaScript is an object-oriented computer programming language. It is most-commonly used for interactive effects in the browser. file.
Event Definition
Define custom event DOM (Document Object Model) events are signals or notifications that something has occurred or is occurring within a web page, often triggered by user interactions or by the browser itself. These events allow JavaScript to react to changes and interactions on a web page, making it dynamic and interactive. key attributes in the manifest.json file. Each entry in the root-level or component-level events array An array is a type of object that stores one or more data types. Data types supported in arrays include numbers, strings, and objects. (components → events) defines an event available in the Unqork Designer Platform.
Learn more about the event definition in our BYO: Understanding the manifest.json File article.
A component can dispatch custom events that are handled through configuration in the Operations Builder. This enables developers to trigger logic or workflows in response to component behavior.
Define each event as a named export in your main JavaScript JavaScript is an object-oriented computer programming language. It is most-commonly used for interactive effects in the browser. file. The export name must match the type value specified in the manifest.json file.
class CustomEvent {
name = 'myComponentClick';
payload = {};
}
export const myComponentClick = {
model: async () => CustomEvent
}
Event Payloads
Custom events can carry structured payload data. This data provides context about end-user End-users, also known as Express Users, are the individuals accessing an application through Express View. In most cases, end-users are the customers using the product. interactions triggering events.
Developers define the event payloads in the implementation JavaScript and manifest.json. After implementation, a Creator Also known as Unqork Users, or Designer Users; is anyone who is inside the Unqork platform. can use the values of the event payload in their configuration by referencing the Operations Builder's Context Reference panel.
Passing values, like the content of an input field, ID of a clicked row, or a selected cell, lets Creators make operation logic dynamic and responsive to end-user End-users, also known as Express Users, are the individuals accessing an application through Express View. In most cases, end-users are the customers using the product. actions. Downstream operations can use these values to perform targeted updates based on the event’s context.
Learn more about event payloads in our BYO: Event Payloads article.
Resources
Bring Your Own (BYO) Framework Landing Page
Find all the resources needed to build your own components here.
Introduction to the Bring Your Own (BYO) Framework
Create a BYO Package
Understanding the manifest.json File
Learn about the file's specification, component and event definitions.
Understanding the BYO Runtime Engine API
Discover the interface between your custom BYO components and the Unqork platform.
Custom Component SDK
Extend component functionality in the Unqork Designer Platform.
Custom Component
Understand the state, interface, and events of a custom component.
BYO 7.22 Implementation Examples
Discover examples of component implementation using the 7.22 Unqork Designer Platform.
BYO 7.24 Implementation Examples
Discover examples of component implementation using the 7.24 Unqork Designer Platform.
Host External Assets Using a CDN (Content Delivery Network) Setup
Learn about setting up Express roles and managing permissions.
BYO Best Practices
Learn about best practices for implementing and using BYO assets.