MCPcopy
hub / github.com/vitejs/vite / getBg

Function getBg

playground/test-utils.ts:121–126  ·  view source on GitHub ↗
(
  el: string | ElementHandle | Locator,
)

Source from the content-addressed store, hash-verified

119}
120
121export async function getBg(
122 el: string | ElementHandle | Locator,
123): Promise<string> {
124 el = await toEl(el)
125 return el.evaluate((el) => getComputedStyle(el as Element).backgroundImage)
126}
127
128/**
129 * Unlike `getBg`, this function returns the raw value of the `background-image` CSS property.

Calls 1

toElFunction · 0.85

Tested by 1

sassTestFunction · 0.68