public/script/debug_interface.js
// updated to reflect the fact that the |room| has been selected.
updated to reflect the fact that the |room| has been selected.
updated to reflect the fact that the |room| has been selected .
async composeServiceList(room, event) {
        for (const element of this.#elements.rooms.querySelectorAll('li.selected'))
            element.classList.remove('selected');
        event.target.classList.add('selected');
        const container = this.#elements.services;
        const { services } = await this.#connection.send({
            command: 'environment-services',
            room,
        });
        while (container.firstChild)
            container.removeChild(container.firstChild);
        const listElement = document.createElement('ul');
        for (const { label, service, options } of services) {
            const serviceElement = document.createElement('li');
            serviceElement.innerText = label;
            serviceElement.addEventListener(
                'click', DebugInterface.prototype.composeCommandList.bind(this, service, options));
            listElement.appendChild(serviceElement);
        }
        container.appendChild(listElement);
    }
async composeServiceList ( room , event ) { for ( const element of this . #elements . rooms . querySelectorAll ( 'li.selected' ) ) element . classList . remove ( 'selected' ) ; event . target . classList . add ( 'selected' ) ; const container = this . #elements . services ; const { services } = await this . #connection . send ( { command : 'environment-services' , room , } ) ; while ( container . firstChild ) container . removeChild ( container . firstChild ) ; const listElement = document . createElement ( 'ul' ) ; for ( const { label , service , options } of services ) { const serviceElement = document . createElement ( 'li' ) ; serviceElement . innerText = label ; serviceElement . addEventListener ( 'click' , DebugInterface . prototype . composeCommandList . bind ( this , service , options ) ) ; listElement . appendChild ( serviceElement ) ; } container . appendChild ( listElement ) ; }
updated to reflect the fact that the |room| has been selected.
updated to reflect the fact that the |room| has been selected .