# 是否有主题加载事件？

**URL:** <https://meta.discourse.org/t/is-there-an-event-for-topic-load/83955>\
**Category:** Development\
**Created:** [2018年三月27日 12:45 UTC](https://meta.discourse.org/t/is-there-an-event-for-topic-load/83955 "2018-03-27T12:45:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordan1909](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jordan1909](https://meta.discourse.org/u/jordan1909)\
**Post date:** [2018年三月27日 12:45 UTC](https://meta.discourse.org/t/is-there-an-event-for-topic-load/83955/1 "2018-03-27T12:45:36Z")

</div>

I need to track if a topic was loaded to override the visibility.

Is there an event similar to Discourse.on(:topic\_created) that would allow me to see when a topic is requested?

---

<div class="post-metadata">

**Author:** ![jordan1909](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jordan1909](https://meta.discourse.org/u/jordan1909)\
**Post date:** [2018年三月27日 12:57 UTC](https://meta.discourse.org/t/is-there-an-event-for-topic-load/83955/2 "2018-03-27T12:57:59Z")

</div>

I see that I could use api.onPageChanged however I am a bit concerned that I may end up detecting things that are not topic loads.
