Members
(constant) AvenxErrorCodes :AvenxErrorCodesType
Type:
- Source:
(constant) AvenxErrorMessages :Object.<string, string>
Message templates mapping for each AvenxErrorCodes identifier. Placeholders are specified as {0}, {1}, etc. and replaced at formatting time.
Type:
- Object.<string, string>
- Source:
(constant) RAW_SYMBOL
Factory for creating proxy handlers used in reactive state. Handles normal property access and computed property redirection.
- Source:
Methods
belongsToComponent(element, root) → {boolean}
Checks if a given DOM element belongs to the component defined by root. Deals with nested component boundaries and transcluded slots.
Parameters:
| Name | Type | Description |
|---|---|---|
element |
Element | |
root |
Element |
- Source:
Returns:
- Type
- boolean
flushJobs()
Flushes all queued jobs in a loop until the queue is completely empty.
- Source:
formatMessage(code, …args) → {string}
Formats a message template with arguments for safe non-throwing console reporting.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
code |
string | The AvenxErrorCode identifier. |
|
args |
any |
<repeatable> |
Arguments to format within the template message. |
- Source:
Returns:
The formatted warning message containing the error code and content.
- Type
- string
html(strings, …values) → {SafeHtml}
Creates a SafeHtml wrapper for raw HTML insertion. Can be used as a standard function: html('
unsafe
') or as a tagged template literal: html<p>${unsafe}</p>
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
strings |
string | TemplateStringsArray | ||
values |
any |
<repeatable> |
- Source:
Returns:
- Type
- SafeHtml
isReactiveTarget(value) → {boolean}
Checks if the value is a candidate for reactive wrapping. We restrict this to plain objects and arrays to avoid issues with built-in classes (Date, RegExp, Map, Set, Promise) and custom class instances that may contain private fields or internal slots.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | The value to check. |
- Source:
Returns:
True if the value should be reactive, false otherwise.
- Type
- boolean
processBindDirectives(template) → {string}
Processes data-ax-bind attributes on input, textarea, and select elements. Converts data-ax-bind="expr" to value="{{ expr }}" and event listener.
Parameters:
| Name | Type | Description |
|---|---|---|
template |
string | The template string. |
Returns:
The processed template.
- Type
- string
queueJob(job)
Queues a job (update callback) to be executed in the next microtask. Deduplicates multiple calls to the same job.
Parameters:
| Name | Type | Description |
|---|---|---|
job |
function | The callback to run. |
- Source:
Type Definitions
AvenxErrorCodesType
Registry of unique Avenx error/warning codes.
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
COMPILER_DIST_CREATION_FAILED |
string | AVX_C01: Failed to create the build output directory. |
COMPILER_SRC_DIR_MISSING |
string | AVX_C02: The source directory ('src') does not exist. |
MOUNT_TARGET_NOT_FOUND |
string | AVX_R01: The specified target container element was not found in the DOM. |
PAGE_NOT_FOUND |
string | AVX_R02: The requested page class was not registered with the application. |
COMPONENT_NOT_FOUND |
string | AVX_R03: The requested component class was not registered with the application. |
COMPUTED_CIRCULAR_DEPENDENCY |
string | AVX_R04: Circular references/loops detected in active computed property evaluations. |
COMPUTED_EVALUTION_FAILED |
string | AVX_R05: An error occurred during evaluation of a computed property. |
ROUTER_GUARD_DENIED |
string | AVX_R06: A navigation guard explicitly rejected the route transition. |
ROUTER_GUARD_ERROR |
string | AVX_R07: An unhandled exception occurred within a route guard's canActivate method. |
TEMPLATE_RENDER_ERROR |
string | AVX_R08: Failed to interpolate expression values within component template. |
EVENT_HANDLER_ERROR |
string | AVX_R09: Executing an event action callback statement failed. |
- Source: