fix(colorScheme): dispatch onColorSchemeChange at page load (#118)
This commit is contained in:
@@ -9,6 +9,8 @@ class StackColorScheme {
|
|||||||
this.bindMatchMedia();
|
this.bindMatchMedia();
|
||||||
this.currentScheme = this.getSavedScheme();
|
this.currentScheme = this.getSavedScheme();
|
||||||
|
|
||||||
|
this.dispatchEvent(document.body.dataset.scheme as colorScheme);
|
||||||
|
|
||||||
if (toggleEl)
|
if (toggleEl)
|
||||||
this.bindClick(toggleEl);
|
this.bindClick(toggleEl);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user