Web Control SDK

The Web Control SDK (software development kit) describes how to create your own custom controls or integrate 3rd party web controls into Xojo.

Overview

The full Web Control SDK document and example projects are included with your Xojo installation:

Examples/Platforms/Web/WebSDK

Basic concepts

Creating Web Controls in Xojo is a give and take relationship that requires careful planning for optimal execution. Read each section of this guide so that you have a good working knowledge of how communications with 3rd party controls works.

Namespaces

For the purposes of avoiding conflicts between framework code, your code and anything else that you might put in your application, you must use a namespace for your controls.

The root namespace for custom controls is XojoCustom, which you should use for all your JavaScript code. Refer to the Namespaces section for more information. To request a root namespace registration, send an email to WebNamespace@xojo.com and tell us what root namespace you would like to use. You will receive an email from us confirming your namespace choice.

Control naming conventions

To prevent name conflicts and to make it easier to identify in lists, you should prefix your classes. For example, a company named Acme might name their controls Acme_Button or Acme_SourceList.

Event order

Understanding the initial sequence of events that fire when your control is created and then added to a web page is crucial for successful deployment and the Xojo developer experience.

For more information about the Events that are available to you and the order in which they fire, please see the Events section.

Web SDK contents

  • Getting Started

  • Namespaces

  • WebControlWrapper

  • JavaScript Methods

  • JavaScript Events

  • Styles

  • JavaScript Libraries

  • Embedding Images

  • Localization

  • IDE Integration

  • Drag and Drop

  • Testing, Compatibility and Bugs

  • Important Notes