DOMStylesReader
Extends:
This mixin is used by the CanvasDrawer in MinimapElement to
read the styles informations from the DOM to use when rendering
the Minimap.
Method Summary
| Public Methods | ||
| public |
Invalidates the cache by emptying the cache object. |
|
| public |
retrieveStyleFromDom(scopes: Array<string>, property: string, shadowRoot: boolean, cache: boolean): string Returns the computed values for the given property and scope in the DOM. |
|
Public Methods
public retrieveStyleFromDom(scopes: Array<string>, property: string, shadowRoot: boolean, cache: boolean): string source
Returns the computed values for the given property and scope in the DOM.
This function insert a dummy element in the DOM to compute its style, return the specified property, and clear the content of the dummy element.
Params:
| Name | Type | Attribute | Description |
| scopes | Array<string> | a list of classes reprensenting the scope to build |
|
| property | string | the name of the style property to compute |
|
| shadowRoot | boolean |
|
whether to compute the style inside a shadow DOM or not |
| cache | boolean |
|
whether to cache the computed value or not |