@@ -36,7 +36,7 @@ Transaction, invokes [middleware](/middleware.html), compares old and new markup
3636| ----------- | -----------
3737| ** mount** | DOM Node or VTree to sync or patch the ** childNodes** of.
3838| ** input** | New markup to replace into ** mount** .
39- | ** options** | ** [ Config options] ( #config- options ) ** , ` inner ` is always ` true `
39+ | ** options** | ** [ Config options] ( #options ) ** , ` inner ` is always ` true `
4040
4141<a name =" inner-html-examples " ></a >
4242
@@ -72,7 +72,7 @@ but this can sometimes result in unexpected behavior.
7272| ----------- | -----------
7373| ** mount** | DOM Node or VTree to sync or patch.
7474| ** input** | New markup to replace into ** mount** .
75- | ** options** | ** [ Config options] ( #config- options ) ** , ` inner ` is always ` false `
75+ | ** options** | ** [ Config options] ( #options ) ** , ` inner ` is always ` false `
7676
7777<a name =" outer-html-examples " ></a >
7878
@@ -105,7 +105,7 @@ All middleware run during this, so features like components and logging work.
105105| Name | Description
106106| ----------- | -----------
107107| ** input** | New markup to replace into ** mount** .
108- | ** options** | ** [ Config options] ( #config- options ) ** , ` inner ` and ` executeScripts ` have no effect
108+ | ** options** | ** [ Config options] ( #options ) ** , ` inner ` and ` executeScripts ` have no effect
109109
110110<a name =" to-string-examples " ></a >
111111
@@ -548,30 +548,40 @@ Property which indicates the current running version of diffHTML.
548548console .log (VERSION );
549549```
550550
551- <a name =" config- options" ></a >
551+ <a name =" options " ></a >
552552
553553---
554554
555- ## <a href =" #config- options " >Config options </a >
555+ ## <a href =" #options " >Options </a >
556556
557- - [ ` inner ` ] ( #config-options-inner )
558- - [ ` tasks ` ] ( #config-options-tasks )
559- - [ ` executeScripts ` ] ( #config-options-execute-scripts )
560- - [ ` parser ` ] ( #config-options-parser )
557+ Allows configuring runtime rendering behavior. These options are accessible via
558+ ` transaction.config ` and can be set via query string, environment variables, or
559+ passing a config object to ` innerHTML ` , ` outerHTML ` , and ` toString ` .
561560
562- <a name =" config-options-inner " />
561+ In the case of query string and environment variables, uppercase the variables
562+ and prefix with ` DIFF_ ` . So ` inner ` becomes ` DIFF_INNER ` . For ` parser ` use a
563+ JSON string: ` JSON.stringify({ parser: { strict: true } }) ` .
563564
564- ### <a href =" #config-options-inner " >inner ` Boolean ` </a >
565+ - [ ` inner ` ] ( #options-inner )
566+ - [ ` tasks ` ] ( #options-tasks )
567+ - [ ` executeScripts ` ] ( #options-execute-scripts )
568+ - [ ` parser ` ] ( #options-parser )
569+
570+ <a name =" options-inner " />
571+
572+ ---
573+
574+ ### <a href =" #options-inner " >inner ` Boolean ` </a >
565575
566576Determines if the Transaction should update the DOM Node or just its children.
567577Setting this to ` true ` will emulate the behavior of ` innerHTML ` and setting it
568578to ` false ` emulates ` outerHTML ` . You cannot set this using ` innerHTML ` or
569579` outerHTML ` , and it has no effect with ` toString ` so it is only useful if you
570580manually create Transactions which is an advanced use case.
571581
572- <a name =" config- options-tasks" />
582+ <a name =" options-tasks " />
573583
574- ### <a href =" #config- options-tasks " >tasks ` Function[] ` </a >
584+ ### <a href =" #options-tasks " >tasks ` Function[] ` </a >
575585
576586Manipulate the tasks which run. This can allow you to do interesting things
577587with the core API. You can do API changes like providing a stream or generator
@@ -621,9 +631,9 @@ innerHTML(document.body, `<h1>Hello world</h1>`, {
621631});
622632```
623633
624- <a name =" config- options-execute-scripts" />
634+ <a name =" options-execute-scripts " />
625635
626- ### <a href =" #config- options-execute-scripts " >executeScripts ` Boolean ` </a >
636+ ### <a href =" #options-execute-scripts " >executeScripts ` Boolean ` </a >
627637
628638Control whether or not newly appended scripts are executed or not. When
629639enabled, tricks the browser by setting the ` type ` property to ` no-execute ` when
@@ -644,9 +654,9 @@ innerHTML(document.body, `<script>window.alert('here')</script>`, {
644654
645655```
646656
647- <a name =" config- options-parser" />
657+ <a name =" options-parser " />
648658
649- ### <a href =" #config- options-parser " >parser ` Object ` </a >
659+ ### <a href =" #options-parser " >parser ` Object ` </a >
650660
651661These options modify the parser by making it more strict or changing which
652662elements are treated as block or self closing.
0 commit comments