# Javascript onload not firing

**URL:** <https://meta.discourse.org/t/javascript-onload-not-firing/145763>\
**Category:** Development\
**Created:** [March 27, 2020, 12:52am UTC](https://meta.discourse.org/t/javascript-onload-not-firing/145763 "2020-03-27T00:52:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [March 27, 2020, 1:36pm UTC](https://meta.discourse.org/t/javascript-onload-not-firing/145763/2 "2020-03-27T13:36:19Z")

</div>

You are working with EmberJS here, not vanilla JavaScript. It will not behave the same.

Best to follow EmberJS best practice.

I would consider piggybacking your logic onto an existing component or adding one to a plugin outlet and using the `didInsertElement` hook.

Read the [EmberJS Guides](https://guides.emberjs.com/v3.12.0/)

---

_[View the full topic](https://meta.discourse.org/t/javascript-onload-not-firing/145763)._
