Skip to content

Commit 4839294

Browse files
committed
Support <script> tag
1 parent 2e15d47 commit 4839294

180 files changed

Lines changed: 838 additions & 548 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

__tests__/html2/simple.module.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!doctype html>
2+
<html lang="en-US">
3+
<head>
4+
<link href="/assets/index.css" rel="stylesheet" type="text/css" />
5+
<script crossorigin="anonymous" src="/test-harness.js"></script>
6+
<script crossorigin="anonymous" src="/test-page-object.js"></script>
7+
</head>
8+
<body>
9+
<main id="webchat"></main>
10+
<script type="module">
11+
import { createDirectLine, createStoreWithOptions, renderWebChat } from '/packages/bundle/dist/botframework-webchat.mjs';
12+
13+
run(async function () {
14+
const {
15+
testHelpers: { createDirectLineEmulator }
16+
} = window;
17+
18+
// TODO: This is for `createDirectLineEmulator` only, should find ways to eliminate this line.
19+
window.WebChat = { createStoreWithOptions };
20+
21+
const { directLine, store } = createDirectLineEmulator();
22+
23+
renderWebChat(
24+
{
25+
directLine,
26+
store
27+
},
28+
document.getElementById('webchat')
29+
);
30+
31+
await pageConditions.uiConnected();
32+
});
33+
</script>
34+
</body>
35+
</html>

0 commit comments

Comments
 (0)