docs: clarify task example ownership and failure boundaries
This commit is contained in:
@@ -19,6 +19,7 @@ class TextFetcher {
|
||||
function fetch(self: TextFetcher, url: String): Unit {
|
||||
// url 来自显式 fetch 调用,HTTP(S) GET 由后台 provider 完成;新句柄返回不代表网络已完成。
|
||||
self.task = ui.fetchText(self, "request", url, self.apply)
|
||||
// 只有 fetchText 成功创建新句柄才清旧结果;若 URL 校验/任务额度拒绝,上面的调用报错,下面不会执行。
|
||||
// 同步清旧结果,避免新请求等待期间让 Console 把旧响应误认成新请求结果。
|
||||
self.response = ""
|
||||
self.output.text = ""
|
||||
|
||||
Reference in New Issue
Block a user