MCPcopy
hub / github.com/bubkoo/html-to-image / getStyleProperties

Function getStyleProperties

src/util.ts:69–82  ·  view source on GitHub ↗
(options: Options = {})

Source from the content-addressed store, hash-verified

67
68let styleProps: string[] | null = null
69export function getStyleProperties(options: Options = {}): string[] {
70 if (styleProps) {
71 return styleProps
72 }
73
74 if (options.includeStyleProperties) {
75 styleProps = options.includeStyleProperties
76 return styleProps
77 }
78
79 styleProps = toArray(window.getComputedStyle(document.documentElement))
80
81 return styleProps
82}
83
84function px(node: HTMLElement, styleProperty: string) {
85 const win = node.ownerDocument.defaultView || window

Callers 2

cloneCSSStyleFunction · 0.90
formatCSSPropertiesFunction · 0.90

Calls 1

toArrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…