docs: clarify shared scene cameras and event lifecycle examples

This commit is contained in:
2026-11-12 21:25:50 +08:00
parent 8a6bdc3790
commit 0c12190e2d
6 changed files with 7 additions and 1 deletions
+1
View File
@@ -7,6 +7,7 @@ class TrackedPage: Page {
// 先递增 calls,再显式调用基类执行跨窗迁移;Page 身份保留,旧 Mount 上下文会替换。
function moveToWindow(self: TrackedPage, window: Window): Page {
// 外部代码/API 选择此源覆盖时进入;显式 Page.moveToWindow 绕过再次动态分派,避免递归调用自身。
// 计数先于原生迁移执行;如果随后基类报错,已发生的 increment 不自动回滚,不能把它当作成功迁移次数。
self.calls.increment()
return Page.moveToWindow(self, window)
}