# A versioned API for client side plugins

**URL:** <https://meta.discourse.org/t/a-versioned-api-for-client-side-plugins/40051>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [23 Fevereiro , 2016 19:20 UTC](https://meta.discourse.org/t/a-versioned-api-for-client-side-plugins/40051 "2016-02-23T19:20:31Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![ccdw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ccdw/32/51564_2.png) [@ccdw](https://meta.discourse.org/u/ccdw)\
**Post date:** [24 Fevereiro , 2016 09:37 UTC](https://meta.discourse.org/t/a-versioned-api-for-client-side-plugins/40051/10 "2016-02-24T09:37:00Z")

</div>

Thanks for the update @eviltrout . Topics are now rendering much faster. I can only imagine how much work was involved, especially considering your efforts to support legacy code.

I do appreciate that code injected client side via the Admin panel isn’t your focus right now, but it would save client side devs a lot of time if you could show how the following deprecated event (or equivalent) is now being generated and how we should hook into it.

```
var topicView = require('discourse/views/topic').default; //get a reference to the topic view

 topicView.reopen({ //access view object
      
      didInsertElement : function(){
        this._super();
        Ember.run.scheduleOnce('afterRender', this, this.afterRenderEvent);
      },
      
      afterRenderEvent : function(){ //after view has been rendered do this:
      
        //console.dir(this); //Use this to to get a good overview of what's available
        console.dir("Category ID: " + this._controller.model.category.id + " - Category Name: " + this._controller.model.category.name);
        
      }
});

```

It’s only a token example, but help with this, coupled to the new API document should be sufficient to get to grips with the new topic architecture.

A final question. Is the new virtual DOM architecture limited to topics only, or are there plans to expands its use elsewhere?

---

_[View the full topic](https://meta.discourse.org/t/a-versioned-api-for-client-side-plugins/40051)._
