Class: GwpLookupPresenter

GwpLookupPresenter(lookupLink, substanceInput, ghgInput, ghgUnitsInput, jsonPath)

Presenter for GWP lookup functionality in the UI.

Constructor

new GwpLookupPresenter(lookupLink, substanceInput, ghgInput, ghgUnitsInput, jsonPath)

Creates a new GwpLookupPresenter.
Parameters:
Name Type Description
lookupLink HTMLElement The lookup link element.
substanceInput HTMLElement The substance name input element.
ghgInput HTMLElement The GHG value input element.
ghgUnitsInput HTMLElement The GHG units select element.
jsonPath string Path to the JSON data file.
Source:

Methods

getSubstance(name) → {KnownSubstance|null}

Gets a substance by name (public interface for testing).
Parameters:
Name Type Description
name string The substance name to look up.
Source:
Returns:
The substance if found and library is loaded.
Type
KnownSubstance | null