Extends
Members
content :Object.<string, Content>
string is an internal name for content displayed on this page, content is the
associated content to the string
Type:
- Object.<string, Content>
- Overrides:
- Source:
contentDiv :HTMLDivElement
Type:
- HTMLDivElement
- Overrides:
- Source:
id :string
the id with wich the page div can be found in the dom
Type:
- string
- Overrides:
- Source:
initializationStarted :boolean
if initialization method was called this value changes to true
Type:
- boolean
- Overrides:
- Source:
isInitialized :boolean
when the page is ready to show this value changes to true, is set by Page.initialize
Type:
- boolean
- Overrides:
- Source:
isSetUp :boolean
when the page was added to the dom and all elements have their event listeners the page is set
up and this value is true. Is set by Page.setup
Type:
- boolean
- Overrides:
- Source:
pageDiv :HTMLElement
is a reference to the element where the page content is displayed
Type:
- HTMLElement
- Overrides:
- Source:
pyodideCallBackDone :boolean
is set to true if Page.afterPyodideLoaded was executed. Is used to determine if a page
missed the first call by PageManager after pyodide was loaded
Type:
- boolean
- Overrides:
- Source:
setUpStarted :boolean
if the setup method was called this value changes to true
Type:
- boolean
- Overrides:
- Source:
Methods
addEventListeners()
call addEventListeners on each Content that is registered in Page.content
- Overrides:
- Source:
afterInit()
Execute after custom code in initialize method of derived class
- Overrides:
- Source:
afterPyodideLoaded()
execute code that depends on Pyodide instance fully loaded
- Overrides:
- Source:
afterSetup()
Execute after custom code in setup method of derived class
- Overrides:
- Source:
beforeInit() → {boolean}
Execute before custom code in initialize method of derived class
- Overrides:
- Source:
Returns:
returns true if the init can continue false otherwise
- Type
- boolean
beforeSetup() → {boolean}
Execute before custom code in setup method of derived class
- Overrides:
- Source:
Returns:
returns true if the setup can continue false otherwise
- Type
- boolean
hide()
hides the page container by adding style=none
- Overrides:
- Source:
initialize()
Page standard implementation of initialize, should be overwritten in child
- Overrides:
- Source:
invalidate()
If called forces the page manager to recall initialize on next page load, effects depend on
implementation of Page.initialize
- Overrides:
- Source:
opacity(newOpacity)
change the opacity of this page
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
newOpacity |
number | 1 | float value between 0 and 1 |
- Overrides:
- Source:
setup() → {DocumentFragment}
Page standard implementation of setup, usually should be overwritten in child
- Overrides:
- Source:
Returns:
- Type
- DocumentFragment
setupEasterEggs()
If a page has Easter-Eggs load and setup everything in this method. This method is called by the
PageManager when the page finished loading to avoid loading "unnecessary" stuff before the page is
functional
- Overrides:
- Source:
show(animate) → {Promise.<boolean>}
displays the page container by adding style=block
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
animate |
boolean | false | slides in the page from the left (experimental) |
- Overrides:
- Source:
Returns:
- Type
- Promise.<boolean>
slideOut()
slide the page out of view to the left (experimental)
- Overrides:
- Source:
updateColor(bgClassName)
some containers need an update of the bs class that bootstrap displays them in the right color
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
bgClassName |
string | bg |
- Overrides:
- Source:
updateLang()
call updateLang on each Content that is registered in Page.content
- Overrides:
- Source: