-
Notifications
You must be signed in to change notification settings - Fork 5
WFES Base version 2 public functions
AlterTobi edited this page Dec 11, 2024
·
3 revisions
all functions are prefixed by window.wfes.f
Add CSS-Element to document's head section as long it does not yet exist.
param | description |
---|---|
id | id for HTML style tag |
styles | text containing the CSS |
Save content as name in IndexedDB in a localStorage compatible way (name-value-pairs)
- get saved data from IndexedDB in a localStorage compatible way (name-value-pairs)
- if data not exists in IDB, try to get it from localStorage and move it to IDB
- return content if nothing exists
Save content as name in localStorage
get saved data from localStorage, or content if nothing exists
get saved data from sessionStorage, or content if nothing exists
Save content as name in sessionStorage
return id based dict from itemlist
create a notification message in lower right corner
param | type | Version | description |
---|---|---|---|
msg | string | 2.0 | the message string |
color | string, optional | 2.0 | background color, must be one of "red", "blue", "orange", "fuchsia", "green", default is "green" |
callbackConfig | object, optional | 2.3 | optional callback funktion with parameters, see below |
Since Base 2.3 it's possible to have an optional callback. Notification will display a button
callbackConfig {
callback: Function : required - the function to call
params: Array : optional - parameters for the callback function
icon: String : optional - one of "play", "search", "renew",
}
(more icons added on request, must be from material font)
returns true if version of wfes-Base is greater or equal minversion
wait until a DOM element appears
param | type | description |
---|---|---|
selector | string | the query selector of the element |
maxWaitTime | integer, optional | max time to wait for element in ms, default = 5 seconds |