@@ -200,6 +200,31 @@ const DefaultConfig = {
200200 * @type Boolean
201201 */
202202 useCanvasWorker : false ,
203+ /**
204+ * `true` will enable the advanced, secure, and performant direct DOM API rendering strategy (recommended).
205+ * In this mode, `Neo.vdom.Helper` will create and send structured VNode object graphs to the Main Thread.
206+ * `Neo.main.DeltaUpdates` will then use `Neo.main.render.DomApiRenderer` to directly manipulate the DOM.
207+ * Crucially, `Neo.main.render.DomApiRenderer` builds new **DOM subtrees** (from the received VNode object graphs)
208+ * as detached DocumentFragments or elements, entirely outside the live DOM tree.
209+ * These fully constructed fragments are then inserted into the live document in a **single, atomic operation**.
210+ * This approach inherently minimizes costly browser reflows/repaints, drastically reduces Cross-Site Scripting (XSS) risks,
211+ * and optimizes for surgical, atomic DOM updates for unparalleled performance.
212+ *
213+ * `false` will enable the legacy string-based rendering strategy.
214+ * In this mode, `Neo.vdom.Helper` will generate complete HTML strings (`outerHTML`) for VNode subtrees.
215+ * `Neo.main.DeltaUpdates` will then use `Neo.main.render.StringBasedRenderer` to insert these
216+ * strings into the DOM using methods like `parentNode.insertAdjacentHTML()`.
217+ * While performant for large insertions, this mode is generally less secure due to potential XSS vectors
218+ * and relies on browser HTML parsing, which can be less efficient for granular updates.
219+ *
220+ * This configuration affects both the initial painting of your applications and the creation
221+ * of new component trees at runtime.
222+ * @default true
223+ * @memberOf ! module:Neo
224+ * @name config.useDomApiRenderer
225+ * @type Boolean
226+ */
227+ useDomApiRenderer : true ,
203228 /**
204229 * Flag if vdom ids should get mapped into DOM element ids.
205230 * false will convert them into a "data-neo-id" attribute.
@@ -246,18 +271,6 @@ const DefaultConfig = {
246271 * @type Boolean
247272 */
248273 useSharedWorkers : false ,
249- /**
250- * `true` will let the `vdom.Helper` create a String-based representation of the vnode tree.
251- * Main will then use e.g.`parentNode.insertAdjacentHTML('beforeend', delta.outerHTML);`
252- * This affects the initial painting of your apps, but also the creation of new component trees at run-time.
253- * `false` will skip the creation of the String, and instead use DOM APIs to generate a fragment inside Main,
254- * into which the vnode tree will get applied.
255- * @default false
256- * @memberOf ! module:Neo
257- * @name config.useStringBasedMounting
258- * @type Boolean
259- */
260- useStringBasedMounting : false ,
261274 /**
262275 * True will generate a new task worker, which can get filled with own expensive remote methods
263276 * @default false
0 commit comments