You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!doctype html><html><head><metacharset="utf-8"><metaname="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,minimal-ui"><title>LexWebUi Demo</title><linkhref="data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAF0lEQVRIx2NgGAWjYBSMglEwCkbBSAcACBAAAeaR9cIAAAAASUVORK5CYII=" rel="icon" type="image/x-icon"/><linkhref="lex-web-ui-loader.min.css" rel="stylesheet"><linkrel="stylesheet" href="./custom-chatbot-style.css"></head><body><scriptsrc="lex-web-ui-loader.min.js"></script><script>// In the most simple form, you can load the component in a single statement:
2
-
// new ChatBotUiLoader.FullPageLoader().load();
3
-
4
-
// The script below break the process into parts to further illustrate
5
-
// the load process.
6
-
7
-
// The ChatBotUiLoader variable contains the FullPageLoader field which is a
8
-
// constructor for the loader.
9
-
varLoader=ChatBotUiLoader.FullPageLoader;
10
-
11
-
// The loader constructor supports various configurable options used to
12
-
// control how the component configuration and dependencies are retrieved.
13
-
// In this case, we are just passing one option (which doesn't changethe
14
-
// default) for illustration purposes.
15
-
varloaderOpts={
16
-
// The following option controls if the local config should be ignored
17
-
// when running this page embedded in an iframe.
18
-
// If set to true, only passes the parentOrigin field when run as an
19
-
// iframe and delegates the config to the parent
20
-
shouldIgnoreConfigWhenEmbedded: true,
21
-
22
-
// Controls if it should load minimized production dependecies
23
-
// defaults to true for production builds and false in development
24
-
shouldLoadMinDeps: true,
25
-
};
26
-
27
-
// Instantiate the loader by optionally passing the loader options to
28
-
// control its behavior. You may leave the options empty if you wish
29
-
// to take the defaults which works in most cases.
30
-
varloader=newLoader(loaderOpts);
31
-
32
-
// When loading the chatbot UI component, you can optionally pass it a
33
-
// configuration object
34
-
varchatbotUiConfig={
35
-
lex: {
36
-
sessionAttributes: {
37
-
/* QNAClientFilter: '', */
38
-
userAgent: navigator.userAgent
39
-
}
40
-
}
41
-
};
42
-
43
-
// Calling the load function of the loader does a few things:
44
-
// 1. Loads JavaScript and CSS dependencies to the DOM
45
-
// 2. Loads the chatbot UI configuration from various sources
46
-
// (e.g. JSON file, event)
47
-
// 3. Instantiates the chatbot UI component in the DOM
0 commit comments