docs: fix data-controller example and remove unused import

- Standardize data-controller placement to <body> element
- Remove unused asyncio import from timeout error example
- Improve documentation consistency
This commit is contained in:
2025-12-30 15:21:02 +01:00
parent 0572bba162
commit 4d6b92e1a4

View File

@@ -1820,7 +1820,6 @@ def create_post_with_tags(consumer, content):
Handle long-running operations with timeouts:
#+BEGIN_SRC python
import asyncio
from threading import Thread
@liveview_handler("process_large_file")
@@ -3044,10 +3043,10 @@ application = URLRouter(
**** ~data-controller="page"~
Required on ~<html>~ or ~<body>~ to activate Stimulus controller.
Required on ~<body>~ element to activate Stimulus controller.
#+BEGIN_SRC html
<html data-controller="page">
<body data-controller="page">
#+END_SRC
**** ~data-room="room-id"~