A deep dive into JavaScript event handling within Quartex Pascal (QTX), aimed at developers building custom components and widgets. Covers the difference between TQTXWidget (DOM-backed) and TQTXComponent (non-visual), explains how to use JEventTarget as an event dispatcher, how to define custom event data classes using JObject, how to trigger events via CustomEvent, and how to create delegate classes that integrate with the QTX IDE. Also introduces the inline class feature for creating ad-hoc JS-compatible objects without pre-defining types, and concludes with practical tips on planning events, using partial classes, and supporting both procedural and delegate-style events.
Table of contents
Custom events?Widget vs Component?The EventTarget classTriggering eventsInline classMaking a delegate objectTips and suggestionsSort: