Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions toolbox/fdc3-explained/1.2/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,19 @@ async function populateHTML() {
//populate available channels list with system channels
let channelList = document.getElementById("system-channel-list");

const populateChannelsList = (name) => {
const populateChannelsList = (channelID) => {
let node = document.createElement("li");
let textNode = document.createTextNode(name);
let textNode = document.createTextNode(channelID);
node.appendChild(textNode);
channelList.appendChild(node);
}

const systemChannels = await fdc3.getSystemChannels();

// for all of the system channels populate dropdowns & lists
systemChannels.forEach(({ displayMetadata, id, type }) => {
let { name } = displayMetadata;
populateChannelsList(name)
populateChannelsDropDown(name)

systemChannels.forEach(({ id }) => {
populateChannelsList(id)
populateChannelsDropDown(id)
});

// set the versions of FDC3 Explained in the dropdown
Expand Down