fn
resetStyle
v0.0.5Restores the inline styles an element had before the most recent
cached setStyle. With prop it restores a single property; otherwise
it restores every property that was remembered. A no-op if nothing was cached.
Example
ts
resetStyle(el); // restore everything setStyle changed
resetStyle(el, 'transform'); // restore just the transformSignature
ts
declare function resetStyle(element: Element | HTMLElement | null, prop?: string): void;Parameters
| Parameter | Type | Description |
|---|---|---|
element | Element | HTMLElement | null | The element to restore |
prop? | string | Restore only this property instead of all of them |