Skip to content

Commit 1be78ae

Browse files
author
Marek Fisera
committed
Add appendElement function
1 parent 3e37137 commit 1be78ae

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/Components/test/testassets/BasicTestApp/wwwroot/JSInitializers/ClassicAndModern/BasicTestApp.lib.module.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export function afterServerStarted() {
3636
appendElement('classic-and-modern-after-server-started', 'Classic and modern "afterServerStarted"');
3737
}
3838

39+
// Duplicated in Components.TestServer\wwwroot\Components.TestServer.lib.module.js
3940
function appendElement(id, text) {
4041
var content = document.getElementById('initializers-content');
4142
if (!content) {

src/Components/test/testassets/Components.TestServer/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Components/test/testassets/Components.TestServer/wwwroot/Components.TestServer.lib.module.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,16 @@ export function beforeWebAssemblyStart() {
44

55
export function afterWebAssemblyStarted() {
66
appendElement('server--classic-and-modern-after-web-assembly-started', 'Server project Classic and modern "afterWebAssemblyStarted"');
7-
}
7+
}
8+
9+
// Duplicated in BasicTestApp\wwwroot\JSInitializers\ClassicAndModern\BasicTestApp.lib.module.js
10+
function appendElement(id, text) {
11+
var content = document.getElementById('initializers-content');
12+
if (!content) {
13+
return;
14+
}
15+
var element = document.createElement('p');
16+
element.id = id;
17+
element.innerText = text;
18+
content.appendChild(element);
19+
}

0 commit comments

Comments
 (0)