Class StyleManager
              
                  Implements
              
           
           - Iterable<[string, RuleManager]>
Index
Accessors
Methods
Accessors
isConnected 
- get isConnected(): booleanDetermines if this StyleManager style element is still connected / available. Returns booleanIs StyleManager connected. 
textContent 
- get textContent(): stringReturns stringProvides an accessor to get the textContentfor the style sheet.
version
- get version(): stringReturns stringReturns the version of this instance. 
Methods
[iterator]
- Allows usage in - for ofloops directly.- Returns MapIterator<[string, RuleManager]>- Entries Map iterator. 
clone
- Provides a copy constructor to duplicate an existing StyleManager instance into a new document. - Parameters- options: CloneRequired clone options. 
 - Returns StyleManager- New style manager instance or undefined if not connected. 
- options: Clone
entries
- Returns MapIterator<[string, RuleManager]>- RuleManager entries iterator. 
get
- Retrieves an associated RuleManager by name. - Parameters- ruleName: stringRule name. 
 - Returns RuleManager- Associated rule manager for given name or undefined if the rule name is not defined or manager is unconnected. 
- ruleName: string
has
- Returns whether a StyleManager.CSSRuleManger exists for the given name. - Parameters- ruleName: stringRule name. 
 - Returns boolean- Is there a CSS rule manager with the given name. 
- ruleName: string
keys
- Returns MapIterator<string>- RuleManager keys iterator. 
values
- Returns MapIterator<RuleManager>- Iterator of all RuleManager instances. 
Staticconnect
- Connect to an existing dynamic styles managed element by CSS ID with semver check on version range compatibility. - Parameters- options: ConnectOptions. 
 - Returns StyleManager
- options: Connect
Staticcreate
- Parameters- options: StyleManager.Options.CreateOptions. 
 - Returns StyleManager- Created style manager instance or undefined if already exists with a higher version. 
- options: StyleManager.Options.Create
Staticexists
- Query and check for an existing dynamic style manager element / instance given a CSS ID. - Parameters- options: StyleManager.Options.ExistsOptions. 
 - Returns StyleManager.Data.Exists- Undefined if no style manager is configured for the given CSS ID otherwise an object containing the current version and HTMLStyleElement associated with the CSS ID. 
- options: StyleManager.Options.Exists
Provides a managed dynamic style sheet / element useful in configuring global CSS variables. When creating an instance of StyleManager, you must provide a CSS ID for the style element.
Instances of StyleManager must be versioned by supplying a semver version string via the 'version' option. This version is assigned to the associated style element. When a StyleManager instance is created and there is an existing instance with a version that is lower than the current new instance, all CSS rules are removed, letting the higher version take precedence. This isn't a perfect system and requires thoughtful construction of CSS variables exposed, but allows multiple independently compiled TRL packages to load the latest CSS variables..