obsidian/SliderComponent
Mock of Obsidian’s SliderComponent, a range input bound to a numeric value.
Classes
Section titled “Classes”| Class | Description |
|---|---|
| SliderComponent | Mock of Obsidian’s SliderComponent. As in Obsidian, the value lives in SliderComponent.sliderEl, and the limits are its min, max and step attributes. A browser keeps a range input’s value inside those limits and on a step; jsdom does not, so the mock applies the same rules itself whenever it reads the value. SliderComponent.setValue calls the change callback only when the value actually changes, and the element’s input and change events call it as Obsidian does, depending on SliderComponent.instant. |