@@ -15,7 +15,7 @@ While 99% of Neo.mjs development happens at the Component Tree layer, creating c
1515Neo.mjs VDom nodes are plain JavaScript objects that represent DOM elements.
1616** Important** : VDom only contains structure, styling, content, and attributes - ** never event listeners** .
1717
18- ``` javascript
18+ ``` javascript readonly
1919// Basic VDom node structure
2020{
2121 tag : ' div' , // HTML tag (default: 'div')
@@ -41,7 +41,7 @@ Neo.mjs VDom nodes are plain JavaScript objects that represent DOM elements.
4141
4242Components define their internal DOM structure via the ` vdom ` config:
4343
44- ``` javascript
44+ ``` javascript readonly
4545import Component from ' ./src/component/Base.mjs' ;
4646
4747class CustomButton extends Component {
@@ -81,7 +81,7 @@ For a comprehensive deep dive into all aspects of DOM event handling in Neo.mjs
8181
8282Here's a simple example of how an event handler defined via ` domListeners ` would interact with a component's VDom:
8383
84- ``` javascript
84+ ``` javascript readonly
8585import Component from ' ./src/component/Base.mjs' ;
8686import VdomUtil from ' ./src/util/Vdom.mjs' ; // For accessing VDom nodes by flag
8787
@@ -144,7 +144,7 @@ class InteractiveComponent extends Component {
144144
145145The typical way to sync VDom changes to the DOM is through the component's ` update() ` method:
146146
147- ``` javascript
147+ ``` javascript readonly
148148import Component from ' ./src/component/Base.mjs' ; // Required import
149149
150150class StandardComponent extends Component {
@@ -180,7 +180,7 @@ class StandardComponent extends Component {
180180For performance-critical scenarios, you can bypass the VDom worker's diffing engine and send manually crafted deltas
181181directly from the App Worker to the Main Thread. This offers precise control but requires careful manual delta construction.
182182
183- ``` javascript
183+ ``` javascript readonly
184184import Component from ' ./src/component/Base.mjs' ; // Required import
185185
186186class AdvancedComponent extends Component {
@@ -240,7 +240,7 @@ class AdvancedComponent extends Component {
240240
241241Flags provide efficient, direct access to specific VDom nodes within a component's ` vdom ` structure, avoiding the need for DOM queries.
242242
243- ``` javascript
243+ ``` javascript readonly
244244import Component from ' ./src/component/Base.mjs' ;
245245import VdomUtil from ' ./src/util/Vdom.mjs' ; // Required import for VdomUtil
246246import NeoArray from ' ./src/util/Array.mjs' ; // Required import for NeoArray
@@ -304,7 +304,7 @@ class IconButton extends Component {
304304
305305Build VDom structures programmatically, often in response to data changes. This is common for lists or complex, data-driven UI fragments.
306306
307- ``` javascript
307+ ``` javascript readonly
308308import Component from ' ./src/component/Base.mjs' ; // Required import
309309
310310class DataList extends Component {
@@ -380,7 +380,7 @@ class DataList extends Component {
380380
381381For sophisticated UI patterns like 3D visualizations or complex dynamic layouts, you might imperatively calculate and apply VDom properties or even use ` Neo .applyDeltas ()` for maximum performance.
382382
383- ` ` ` javascript
383+ ` ` ` javascript readonly
384384import Component from ' ./src/component/Base.mjs' ; // Base component class
385385
386386class Helix extends Component {
@@ -452,7 +452,7 @@ class Helix extends Component {
452452
453453### XSS Prevention
454454
455- ` ` ` javascript
455+ ` ` ` javascript readonly
456456import Component from ' ./src/component/Base.mjs' ; // Required import
457457// import DOMPurify from 'dompurify'; // Example for external sanitization library
458458
@@ -499,7 +499,7 @@ this.update();
499499
500500### 1. Batch VDom Updates
501501
502- ` ` ` javascript
502+ ` ` ` javascript readonly
503503import Component from ' ./src/component/Base.mjs' ; // Required import
504504import Neo from ' ./src/Neo.mjs' ; // Required import for Neo.applyDeltas
505505
@@ -547,7 +547,7 @@ class PerformantComponent extends Component {
547547
548548### 2. Efficient Event Delegation
549549
550- ` ` ` javascript
550+ ` ` ` javascript readonly
551551import Component from ' ./src/component/Base.mjs' ; // Required import
552552
553553class EfficientEventComponent extends Component {
@@ -595,7 +595,7 @@ super.construct(config);
595595
596596### 3. Memory Management
597597
598- ` ` ` javascript
598+ ` ` ` javascript readonly
599599import Component from ' ./src/component/Base.mjs' ; // Required import
600600
601601class MemoryEfficientComponent extends Component {
@@ -632,7 +632,7 @@ class MemoryEfficientComponent extends Component {
632632
633633Dynamically show or hide VDom nodes by setting their ` removeDom` property. This is efficient as the VDom node remains in the tree, but its corresponding DOM element is removed/added from the document flow by the framework.
634634
635- ` ` ` javascript
635+ ` ` ` javascript readonly
636636import Component from ' ./src/component/Base.mjs' ; // Required import
637637import VdomUtil from ' ./src/util/Vdom.mjs' ; // Required import
638638
@@ -673,7 +673,7 @@ class ConditionalComponent extends Component {
673673
674674Programmatically create and update lists of VDom nodes, typically from data. This approach is highly efficient as the VDom diffing engine optimizes the DOM updates.
675675
676- ` ` ` javascript
676+ ` ` ` javascript readonly
677677import Component from ' ./src/component/Base.mjs' ; // Required import
678678
679679class ListComponent extends Component {
0 commit comments