@stacksjs/components 0.2.862 → 0.2.864

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,12 @@ export interface PreviewFrameProps {
14
14
  frameHeight?: number
15
15
  /** Turn a phone or tablet on its side. */
16
16
  landscape?: boolean
17
- /** What the page's `prefers-color-scheme` reports. `auto` (default) follows the host page. */
17
+ /**
18
+ * The colour scheme the frame is drawn with, which is what the page's
19
+ * `prefers-color-scheme` reports in an engine that passes a frame's scheme
20
+ * to its page (Chromium; WebKit reports the system's). `auto` (default)
21
+ * follows the host page.
22
+ */
18
23
  scheme?: PreviewScheme
19
24
  /** Let the page's own scripts run. They get an origin of their own and cannot reach the host. Default off. */
20
25
  scripts?: boolean
@@ -222,9 +222,11 @@ export class PreviewFrameView {
222
222
  }
223
223
 
224
224
  /**
225
- * A frame's page takes its `prefers-color-scheme` from the `color-scheme`
226
- * its frame element is drawn with. So the scheme is set here, on the host's
227
- * side, and the page needs no script and no cooperation to follow it.
225
+ * The scheme is set here, on the host's side, as the frame element's
226
+ * `color-scheme`. Chromium hands that to the page as its
227
+ * `prefers-color-scheme`, so the page follows with no script and no
228
+ * cooperation. WebKit does not hand it over: there the page keeps the
229
+ * system's scheme whatever is set here (stacksjs/stx#2186).
228
230
  */
229
231
  private applyScheme(): void {
230
232
  const scheme = this.effectiveScheme()