src/session/widget_id_manager.ts
A widget id manager, to ensure widgets always have their own unique ID one could
Methods |
constructor(storage: WidgetIdStorage)
|
||||||
|
Parameters :
|
| forget | ||||||||
forget(name: string)
|
||||||||
|
Forget an existing widget id.
Parameters :
Returns :
void
|
| id | ||||||||
id(name: string)
|
||||||||
|
Retrieve an ID within the current scope of the window. If the name is already register in the instance manager the existing ID will be returned to resume old state.
Parameters :
Returns :
WidgetId
|
| reset |
reset()
|
|
Reset the manager to its original state.
Returns :
void
|
| scopeToPage | ||||||||
scopeToPage(page: string)
|
||||||||
|
Scope the manager to a specific page so that instance ids can be stored under different pages. When switching scopes ids generated under the old page will be cleared. By default, the scope is set to 'global'.
Parameters :
Returns :
void
|