Extends
Members
idLangMap :Map.<string, function()>
string is an id used for an element in the dom that displays a language string. The
language string is retrieved dynamically from the LanguageManager and put as innerHTML of the element
if Content.updateLang is called
Type:
- Map.<string, function()>
- Inherited From:
- Source:
mainID :string
the id of the element in the dom that holds this content
Type:
- string
- Inherited From:
- Source:
Methods
addEventListeners()
adds event listeners to elements if necessary
- Inherited From:
- Source:
(abstract) afterPyodideLoaded()
Executes code that depends on Pyodide fully loaded.
Is called after Pyodide is ready and makes changes to the element created with
this.setup() that can only be active or made after Pyodide is loaded. Is called by PageManager as soon as
Pyodide is ready.
- Inherited From:
- Source:
createStartBtn(id) → {HTMLButtonElement}
generate a start button that can display the loading progress of Pyodide
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string | id of the element in the dom |
- Inherited From:
- Source:
Returns:
- Type
- HTMLButtonElement
setup() → {Element|DocumentFragment}
create the element that is added to the dom, if nothing is added to the dom return a DocumentFragment
- Inherited From:
- Source:
Returns:
- Type
- Element | DocumentFragment
(abstract) setupEasterEggs()
Is called after the Page is usable by PageManager and is the set-up of funny functionality but not necessary
for function of page.
- Inherited From:
- Source:
showStartBtnEnabled(startBtn)
removes the containers added with Content.showStartBtnProgressBar and activates the button
Parameters:
| Name | Type | Description |
|---|---|---|
startBtn |
- Inherited From:
- Source:
showStartBtnProgressBar(startBtn)
adds the innerHTML to an HTML element that indicate the loading progress of Pyodide
Parameters:
| Name | Type | Description |
|---|---|---|
startBtn |
HTMLButtonElement |
- Inherited From:
- Source:
updateColor()
updates the color of elements, text or headings if necessary
- Overrides:
- Source:
updateLang()
iterates over each id specified in Content.idLangMap and reassigns the current language string to the
innerHTML of the element retrieved from the dom with document.getElementById(id)
- Inherited From:
- Source: