FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs(mkdocs): clarify browser preview platform selection · pythonnative/pythonnative@f782c2d · GitHub

Repository navigation

Commit f782c2d

Browse files
committed
docs(mkdocs): clarify browser preview platform selection
1 parent 0956970 commit f782c2d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎docs/meta/faq.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ Yes. Two patterns:
3434
...
3535
```
3636

37-
`pn preview` runs the app with `IS_WEB` set; see the
37+
`pn preview` and `pn start` set `PN_PLATFORM=web`, so `IS_WEB` is
38+
`True` in the browser preview; see the
3839
[Browser preview guide](../guides/browser-preview.md).
3940
For a declarative alternative, use
40-
[`Platform.select`][pythonnative.platform.Platform.select].
41+
[`Platform.select`][pythonnative.platform.Platform.select] with the
42+
`"web"` key.
4143

4244
- **Per-platform native modules** for larger pieces (a custom widget,
4345
a device API). Implement once per platform behind a single Python

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL