MCPcopy
hub / github.com/tailwindlabs/tailwindcss / observeSheet

Function observeSheet

packages/@tailwindcss-browser/src/index.ts:235–243  ·  view source on GitHub ↗
(sheet: HTMLStyleElement)

Source from the content-addressed store, hash-verified

233let styleObserver = new MutationObserver(() => rebuild('full'))
234
235function observeSheet(sheet: HTMLStyleElement) {
236 styleObserver.observe(sheet, {
237 attributes: true,
238 attributeFilter: ['type'],
239 characterData: true,
240 subtree: true,
241 childList: true,
242 })
243}
244
245// Handle changes to the document that could affect the styles
246// - Changes to any element's class attribute

Callers 2

createCompilerFunction · 0.85
index.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected