Introduction

a.js is a lightweight and versatile JavaScript Flexwork/library designed for building reactive and dynamic web components. It extends the power of native web components by introducing custom tags (<a-script>, <a-closure>, and <a-tagDef>) that simplify complex operations such as state management, reactivity, and scoped behavior. These custom tags integrate seamlessly with modern JavaScript, allowing developers to create dynamic user interfaces with ease.

This documentation is targeted at developers familiar with JavaScript. Knowledge about web components and proxies is useful to understand what's going one behind the scene. If you are unfamiliar with these concepts, refer to the following resources for a brief primer:

Key Highlights


Overview of Features

Custom HTML Tags

a.js introduces three primary custom tags to enhance web development:

  1. <a-script>
    • A custom replacement for the <script> tag with additional functionality, including scoped execution and integration with a.js features.
  2. <a-closure>
    • Encapsulates JavaScript code in a closure for isolated execution, preventing global namespace pollution.
  3. <a-tagDef>
    • Defines reusable custom components that can be dynamically instantiated in the DOM and re-defined when necessary.

Special Variables and Behaviors

Modular Imports

Advanced Features

> Getting started