# How to embed JavaScript script in front of ,\</body\> tag

**URL:** <https://meta.discourse.org/t/how-to-embed-javascript-script-in-front-of-body-tag/279159>\
**Category:** Development\
**Created:** [September 15, 2023, 2:34pm UTC](https://meta.discourse.org/t/how-to-embed-javascript-script-in-front-of-body-tag/279159 "2023-09-15T14:34:16Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![zengyunsi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zengyunsi/32/265722_2.png) [@zengyunsi](https://meta.discourse.org/u/zengyunsi)\
**Post date:** [September 16, 2023, 3:38pm UTC](https://meta.discourse.org/t/how-to-embed-javascript-script-in-front-of-body-tag/279159/5 "2023-09-16T15:38:04Z")

</div>

It’s mainly this sentence, the previous ones are not a problem

```plaintext
    <script>
        document.addEventListener('DOMContentLoaded', function () {
            const player = new Plyr('video');
        });
    </script>
</body >

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-embed-javascript-script-in-front-of-body-tag/279159)._
