MCPcopy Index your code
hub / github.com/darkreader/darkreader / update

Function update

src/inject/dynamic-theme/index.ts:406–417  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

404 }
405
406 function update() {
407 const details = manager.details({secondRound: true});
408 if (!details) {
409 return;
410 }
411 variablesStore.addRulesForMatching(details.rules);
412 variablesStore.matchVariablesAndDependents();
413 manager.render(theme!, ignoredImageAnalysisSelectors);
414 if (__TEST__) {
415 document.dispatchEvent(new CustomEvent('__darkreader__test__dynamicUpdateComplete'));
416 }
417 }
418
419 const manager = manageStyle(element, {update, loadingStart, loadingEnd});
420 styleManagers.set(element, manager);

Callers 7

manageStyleFunction · 0.85
detailsFunction · 0.85
buildOverridesFunction · 0.85
restoreFunction · 0.85
handleStyleOperationsFunction · 0.85
handleAttributeMutationsFunction · 0.85
watchForStylePositionsFunction · 0.85

Calls 4

detailsMethod · 0.80
addRulesForMatchingMethod · 0.80
renderMethod · 0.65

Tested by

no test coverage detected