| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0956970 commit f782c2d
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,10 +34,12 @@ Yes. Two patterns: | |||
| 34 | 34 | ... | |
| 35 | 35 | ``` | |
| 36 | 36 | ||
| 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 | ||
| 38 | 39 | [Browser preview guide](../guides/browser-preview.md). | |
| 39 | 40 | For a declarative alternative, use | |
| 40 | - [`Platform.select`][pythonnative.platform.Platform.select]. | ||
| 41 | + [`Platform.select`][pythonnative.platform.Platform.select] with the | ||
| 42 | + `"web"` key. | ||
| 41 | 43 | ||
| 42 | 44 | - **Per-platform native modules** for larger pieces (a custom widget, | |
| 43 | 45 | a device API). Implement once per platform behind a single Python | |
| Back | FazBrowse Home | New Git URL |
0 commit comments