Ale.js

Config

config function

The Ale function has a built-in Ale.config function to change some Ale configuration information. The configuration supported by the current config function is as follows:

  • html (default false) [data if the HTML tag output is a node (turn off this option to prevent xss attacks, do not open easily)]
  • diff (default true) [Whether the diff algorithm is applied when operating the DOM (recommended applet is closed, medium and large applications need to be turned on)]
  • async (default true) [whether to enable asynchronous DOM (recommended)]
  • configLock (default false) [Lock configuration information, any configuration can not be modified after locking (recommended after modifying the configuration)]

You can change one of the configurations by:

1
2
3
4
5
6
7
8
9
10
Ale.config("html", true);

/* Or */

Ale.config({
html: true,
diff: false,
async: false,
configLock: true
})

Found some errors? Edit on Github!