Skip to content

Commit 1547687

Browse files
committed
Add a comment about where to find clientdata in shiny.js
1 parent a30b8c8 commit 1547687

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

shiny/session/_session.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,10 @@ def _manage_inputs(self, data: dict[str, object]) -> None:
697697
k = keys[0]
698698
self.input[ResolvedId(k)]._set(val)
699699

700+
# shiny.js sets a special class of inputs (clientdata) for things like the
701+
# URL, output sizes, etc. On the frontend, these all have the prefix
702+
# ".clientdata_". For example, this is where .clientdata_url_search is set:
703+
# https://github.com/rstudio/shiny/blob/58e1521/srcts/src/shiny/index.ts#L631-L632
700704
if k.startswith(".clientdata_"):
701705
k2 = k.split("_", 1)[1]
702706
self.clientdata[ResolvedId(k2)]._set(val)

0 commit comments

Comments
 (0)