# How to get the observes('x').on('init') without prototype extensions?

**URL:** <https://discuss.emberjs.com/t/how-to-get-the-observes-x-on-init-without-prototype-extensions/7876>\
**Category:** Uncategorized\
**Created:** [April 28, 2015, 7:33am UTC](https://discuss.emberjs.com/t/how-to-get-the-observes-x-on-init-without-prototype-extensions/7876 "2015-04-28T07:33:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![serabe](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/serabe/32/9712_2.png) [@serabe](https://discuss.emberjs.com/u/serabe)\
**Post date:** [April 28, 2015, 7:33am UTC](https://discuss.emberjs.com/t/how-to-get-the-observes-x-on-init-without-prototype-extensions/7876/1 "2015-04-28T07:33:49Z")

</div>

What is the idiomatic way to write

```nohighlight
myObserver: function() {
// Some stuff here
}.observes('x').on('init')

```

without function prototypes?

---

<div class="post-metadata">

**Author:** ![od1n](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/od1n/32/10680_2.png) [@od1n](https://discuss.emberjs.com/u/od1n)\
**Post date:** [April 28, 2015, 9:39am UTC](https://discuss.emberjs.com/t/how-to-get-the-observes-x-on-init-without-prototype-extensions/7876/2 "2015-04-28T09:39:12Z")

</div>

Hello, try this one:

```
myObserver: Ember.on('init', Ember.observer('x', function () {
    // Some stuff here
}))

```

---

<div class="post-metadata">

**Author:** ![serabe](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/serabe/32/9712_2.png) [@serabe](https://discuss.emberjs.com/u/serabe)\
**Post date:** [April 28, 2015, 10:02am UTC](https://discuss.emberjs.com/t/how-to-get-the-observes-x-on-init-without-prototype-extensions/7876/3 "2015-04-28T10:02:19Z")

</div>

Thank you, @od1n, I have similar code but I thought there might be some nicer way. Guess we’ll need to wait for the decorator implementation 😄

Thank you!
